Back

required attribute blank

  • 0
  • Databases
  • Self Hosted
mauricev
1 Nov, 2023, 18:37

I have several documents saved in 1.3.7 where a required attribute is blank. I'm not sure how the value got to be blank in my code, but I am also wondering even if I had a bug where my code attempted to save that, how did appwrite manage to carry out the save and not reject the whole createdocument/updatedocument operation?

TL;DR
The user is experiencing an issue with a required attribute being blank in their code. They speculate that the attribute was set to be required before any data was added and wonder if it is still possible for it to be an empty string. They also consider the possibility that the attribute became required after the data was added. The user is puzzled as to how the value became blank in their code and questions how Appwrite allowed the save operation to be carried out without rejecting it. Solution: It is suggested to check the code to see how the attribute is being handled and if any bugs might be causing it to be saved as blank. Additionally, it is
Drake
1 Nov, 2023, 19:03

maybe it was made required after the fact. maybe it's an empty string rather than null

mauricev
1 Nov, 2023, 19:08

I never edited the attribute if that’s what you mean. It was set to be required before any data was added (the whole schema had been migrated from another instance). It says 0/36 for these blank ones. Could that still be an empty string?

Drake
1 Nov, 2023, 19:08

yes, it could be an empty string

Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more