Skip to content

Commit

Permalink
improve utils message
Browse files Browse the repository at this point in the history
  • Loading branch information
Guts committed Aug 19, 2019
1 parent aa5fa7c commit ff049d3
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions isogeo_pysdk/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,7 @@ def get_edit_url(
md_type: str = None,
owner_id: str = None,
tab: str = "identification",
):
) -> str:
"""Constructs the edition URL of a metadata.
:param str md_id: metadata/resource UUID
Expand All @@ -314,8 +314,12 @@ def get_edit_url(
raise ValueError("One of md_id or owner_id is not a correct UUID.")
else:
pass
if checker.check_edit_tab(tab, md_type=md_type):
pass
if not checker.check_edit_tab(tab, md_type=md_type):
logger.warning(
"Tab '{}' is not a valid tab for the is type '{}' of metadata. "
"It'll be replaced by default value.".format(tab, md_type)
)
tab = "identification"
# construct URL
return (
"{}"
Expand Down

0 comments on commit ff049d3

Please sign in to comment.