Skip to content

Commit 0909f6c

Browse files
Jon BendtsenJonBendtsen
authored andcommitted
also fixing entity during post
1 parent 3518988 commit 0909f6c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

htdocs/contrat/class/api_contracts.class.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,7 @@ public function post($request_data = null)
245245
if ($field == 'id') {
246246
throw new RestException(400, 'Creating with id field is forbidden');
247247
}
248-
if ($field == 'entity' && $value != $this->entity) {
248+
if ($field == 'entity' && $value != $this->contract->entity) {
249249
throw new RestException(403, 'Creating entity not the same as your API user is forbidden');
250250
}
251251

0 commit comments

Comments
 (0)