Skip to content

Commit

Permalink
Add support for allow_dynamic_list_values parameter in MetadataField
Browse files Browse the repository at this point in the history
  • Loading branch information
const-cloudinary committed Oct 23, 2024
1 parent b3b7054 commit 89006f2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion cloudinary/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -741,7 +741,7 @@ def update_metadata_field(field_external_id, field, **options):

def __metadata_field_params(field):
return only(field, "type", "external_id", "label", "mandatory", "restrictions",
"default_value", "default_disabled", "validation", "datasource")
"default_value", "default_disabled", "validation", "datasource", "allow_dynamic_list_values")


def delete_metadata_field(field_external_id, **options):
Expand Down
2 changes: 2 additions & 0 deletions test/test_metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -285,12 +285,14 @@ def test07_create_set_metadata_field(self):
"external_id": EXTERNAL_ID_SET,
"label": EXTERNAL_ID_SET,
"type": "set",
"allow_dynamic_list_values": True,
})

self.assert_metadata_field(result, "set", {
"label": EXTERNAL_ID_SET,
"external_id": EXTERNAL_ID_SET,
"mandatory": False,
"allow_dynamic_list_values": True,
})

@unittest.skipUnless(cloudinary.config().api_secret, "requires api_key/api_secret")
Expand Down

0 comments on commit 89006f2

Please sign in to comment.