I have created the document and trying to update it.
I am getting error
"Invalid document structure: Attribute "gatePassStatus" has invalid format. Value must be one of (in-progress, dispatched, comple…"
as I I am trying to update so isn't this field should be optional ? As, I passed this anyway during document creation...
Summary
The user is experiencing an error (Error 400) when trying to update a document if an enum attribute is marked as required. They tried to reproduce the error but were unsuccessful. The user provided the steps they took, but it is still unclear why the issue is occurring. The user mentioned that if the enum attribute is the last attribute and marked as required, the error is thrown. They also mentioned that only one of the two enum attributes is being asked to pass, even though both should be required. It was discovered that the bug is related to the last created enum attribute. The user is still experiencing the error and is unsure why the
Drake
Jul 28, 2023, 08:01
Is the value no longer a possible enum?
Vedsaga
Rank 5: Hypervisor
Jul 28, 2023, 08:02
it is still enum
Vedsaga
Rank 5: Hypervisor
Jul 28, 2023, 08:02
Drake
Jul 28, 2023, 08:02
I mean what are the possible values and what is the current value in the document?
Vedsaga
Rank 5: Hypervisor
Jul 28, 2023, 08:02
these are possible enums
Vedsaga
Rank 5: Hypervisor
Jul 28, 2023, 08:03
and this is the value
Vedsaga
Rank 5: Hypervisor
Jul 28, 2023, 08:04
btw, after passing the enum it seems to work normaly doc is getting updated... but wired part is out of two enum only getting asked to pass gatePassStatus enum only and it's not asking to pass entryReason
Drake
Jul 28, 2023, 08:05
Weird...
Vedsaga
Rank 5: Hypervisor
Jul 28, 2023, 08:06
ok, found the bug... so, if the enum is last then it only ask for last
Vedsaga
Rank 5: Hypervisor
Jul 28, 2023, 08:06
Vedsaga
Rank 5: Hypervisor
Jul 28, 2023, 08:06
I just added then enum and now it's only asking for test enum to pass
Vedsaga
Rank 5: Hypervisor
Jul 28, 2023, 08:07
so, if last created attribute is enum & marked as required then it's throw error
Drake
Jul 28, 2023, 17:42
i can't seem to reproduce the problem. can you give exact steps?
Vedsaga
Rank 5: Hypervisor
Jul 29, 2023, 05:52
I guess steps were,
I create a collection two 3 attributes on of them was enum
Then I deleted the enum attribute and created again ( when mean now this enum is last attrbuties appears in the console)
Then I create a document
Then, I treid to update the doc making sure that Doc securrity is eanbled and user is logged ined
Vedsaga
Rank 5: Hypervisor
Jul 29, 2023, 06:14
version is 1.3.7
Drake
Jul 29, 2023, 14:59
You can run these exact steps on a new collection and reproduce the error?
Vedsaga
Rank 5: Hypervisor
Jul 29, 2023, 15:04
umm, no for some reason it not happening if just created from scratch DB 👀
Drake
Jul 29, 2023, 15:15
We need reproducible steps 😕
Vedsaga
Rank 5: Hypervisor
Jul 29, 2023, 15:15
don't know why it was happening it seems very very wired