Closed slingshotvfx closed 8 months ago
Hello, thank you for the contribution. Can you provide a use case when this is helpful? Cheers
Hey Carlos,
I was adding tests for code that creates ActionMenuItems on a site through the Python API. So I wanted to assert they were created in Mockgun.
The following code:
sg_amis = mockgun.find(
"ActionMenuItem",
filters=[],
fields=[
"title",
"entity_type",
],
)
results in ShotgridError: Field ActionMenuItem.entity_type: Handling for ShotGrid type entity_type is not implemented
As far as I can tell, entity_type fields in Shotgrid are just text fields, maybe limited to a specific set of values matching the entities available in the Shotgrid site. I suppose in Mockgun you could add some validation to verify that the value of entity_type fields exists as an entity name in the Schema, but for my purposes just setting it to a string worked great.
Thanks!
I think it's a good idea to add entity_type
. Thanks. Our team will review this and merge as soon as they can.
For testing purposes, it can be helpful to support
entity_type
field types, even if there's no validation that it's an existing Entity from the schema.