Skip to content

Commit

Permalink
19116 NR changes type Errors (#1507)
Browse files Browse the repository at this point in the history
  • Loading branch information
Rajandeep98 authored Dec 28, 2023
1 parent 3a0a3fe commit b02c608
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
2 changes: 1 addition & 1 deletion api/namex/VERSION.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
__version__ = '1.1.47'
__version__ = '1.1.48'

12 changes: 8 additions & 4 deletions api/namex/services/nro/change_nr.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,10 +131,14 @@ def format_datetime(timestamp_datetime):
"""format datetime from python to oracle format
"""
# Parse the string to a datetime object
timestamp_datetime_pacific = timestamp_datetime.astimezone(pytz.timezone('US/Pacific'))
# Format the datetime object as per the Oracle date format
formatted_timestamp = timestamp_datetime_pacific.strftime('%Y-%m-%d %H:%M:%S')
return formatted_timestamp
if timestamp_datetime is not None:
timestamp_datetime_pacific = timestamp_datetime.astimezone(pytz.timezone('US/Pacific'))
# Format the datetime object as per the Oracle date format
formatted_timestamp = timestamp_datetime_pacific.strftime('%Y-%m-%d %H:%M:%S')
return formatted_timestamp
else:
print("Error: timestamp_datetime is None.")
return None


def _update_request(oracle_cursor, nr, event_id, change_flags, priority):
Expand Down

0 comments on commit b02c608

Please sign in to comment.