Skip to content

Commit 013a718

Browse files
revert: restore ability to index by id
1 parent e32be35 commit 013a718

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

pfSense-pkg-RESTAPI/files/usr/local/pkg/RESTAPI/Core/ModelCache.inc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,11 @@ class ModelCache {
110110
);
111111
}
112112

113+
# Always allow indexing by 'id'
114+
if ($index_field === 'id') {
115+
return;
116+
}
117+
113118
# Check if the index field is unique on the Model object
114119
if (!$model->$index_field->unique) {
115120
throw new ServerError(

0 commit comments

Comments
 (0)