Skip to content

Commit

Permalink
Rename get_uuid argument "gen_hex" to "hex_only"
Browse files Browse the repository at this point in the history
  • Loading branch information
DavisRayM committed Aug 10, 2020
1 parent db0a261 commit 61230ea
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions onadata/libs/utils/common_tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,11 @@ def get_boolean_value(str_var, default=None):
return str_var if default else False


def get_uuid(gen_hex: bool = True):
def get_uuid(hex_only: bool = True):
'''
Return UUID4 hex value
'''
return uuid.uuid4().hex if gen_hex else str(uuid.uuid4())
return uuid.uuid4().hex if hex_only else str(uuid.uuid4())


def report_exception(subject, info, exc_info=None):
Expand Down
2 changes: 1 addition & 1 deletion onadata/libs/utils/logger_tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ def dict2xform(jsform, form_id, root=None, username=None):
root = 'data'

jsform['meta'] = {
'instanceID': 'uuid:' + get_uuid(gen_hex=False)
'instanceID': 'uuid:' + get_uuid(hex_only=False)
}

return "<?xml version='1.0' ?><{0} id='{1}'>{2}</{0}>".format(
Expand Down

0 comments on commit 61230ea

Please sign in to comment.