mirror of
https://github.com/appwrite/appwrite
synced 2026-05-24 09:28:40 +00:00
set null when not required and data key is not set
This commit is contained in:
parent
b3aaca317c
commit
03c48a5ef3
1 changed files with 2 additions and 1 deletions
|
|
@ -590,7 +590,8 @@ class Response extends SwooleResponse
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!$data->isSet($key) && !$rule['required']) { // skip attribute in response if not required and values does not exist
|
if(!$data->isSet($key) && !$rule['required']) { // set output key null if data key is not set and required is false
|
||||||
|
$output[$key] = null;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue