Skip to content

Commit 5928b58

Browse files
committed
Fix resource_view and showcase to check required fields on create path only in create_in_hdx
1 parent 16e3baa commit 5928b58

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

src/hdx/data/showcase.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -134,11 +134,11 @@ def create_in_hdx(self, **kwargs: Any) -> None:
134134
merge_two_dictionaries(self.data, self._old_data)
135135
self.clean_tags()
136136
self._hdx_update("showcase", "name", force_active=True, **kwargs)
137-
else:
138-
if "ignore_check" not in kwargs: # allow ignoring of field checks
139-
self.check_required_fields()
140-
self.clean_tags()
141-
self._save_to_hdx("create", "title", force_active=True)
137+
return
138+
if "ignore_check" not in kwargs: # allow ignoring of field checks
139+
self.check_required_fields()
140+
self.clean_tags()
141+
self._save_to_hdx("create", "title", force_active=True)
142142

143143
def delete_from_hdx(self) -> None:
144144
"""Deletes a showcase from HDX.

0 commit comments

Comments
 (0)