Back

Required Attributes

  • 0
  • Databases
  • Web
  • Cloud
destocot
25 Dec, 2023, 09:00

I was wondering how required attributes plays a role here.

I just created a document and forgot to attach a userId. However, it still made the document without any errors.

When I query the document the userId shows as null

Using Web / Cloud with React

TL;DR
User encountered a bug where a document was created without a required attribute, userId, and did not receive an error. User questioned how required attributes work. User tested the fix and confirmed it resolved the bug.
Drake
25 Dec, 2023, 17:10

userId shows as null

Can you share a screenshot of what you mean?

destocot
25 Dec, 2023, 21:18
destocot
25 Dec, 2023, 21:19
Drake
26 Dec, 2023, 00:08

Thanks! Weird...you should have gotten an error...

Drake
26 Dec, 2023, 07:26

i was able to reproduce...let me check with the team

Drake
27 Dec, 2023, 21:08

ok we fixed the bug. you should get an error now if you try to pass null or if you omit required attributes

destocot
28 Dec, 2023, 00:27

sounds good ill test it out later

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