LaWebcapsule / directus9

directus9 - openSource maintenance of directus
GNU General Public License v3.0
71 stars 9 forks source link

[FIX] Unify count behaviour on validate payloads. #23

Closed adussarps closed 1 year ago

adussarps commented 1 year ago

On validate-payload function, fields should be validated only if they are present on the payload.

However, when it was coming to special functions as count, the validation was trying to run on an empty object, and for count was throwing an error Count(XX) is not a number.

This PR fixes the behavior at the root.

NIT: Part of https://github.com/LaWebcapsule/directus9/issues/22