Skip to content

Commit

Permalink
Fetch data from enum not from the database
Browse files Browse the repository at this point in the history
  • Loading branch information
Shivakumar authored and Shivakumar committed Jan 5, 2024
1 parent 9274c3d commit 6ab5bc1
Showing 1 changed file with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -277,15 +277,15 @@ def __preparenotification(self, message, requesttype, notificationtype, userid,
mutenotification = False

print("notificationtype", notificationtype)
notificationtypes_data = notificationtypes_cache[notificationtype]
if notificationtypes_data is None:
print('Notification type not found', notificationtype)
notification.notificationtypelabel = notificationconfig().getnotificationtypelabel(notificationtype)
notification.notificationtypeid = notificationconfig().getnotificationtypeid(notificationtype)
# in notificationtype remove space and make lower case
notificationtype_format = notificationtype.replace(" ", "").lower()
print ("notificationtype_format", notificationtype_format)
if notificationtype_format not in notificationtypes_cache:
print('Notification type not found in enum.', notificationtype)
else:
print('Notification type found', notificationtype)
notification.notificationtypelabel = notificationtypes_data['notificationtypelabel']
notification.notificationtypeid = notificationtypes_data['notificationtypeid']
notification.notificationtypelabel = notificationtypes_cache[notificationtype_format]['notificationtypelabel']
notification.notificationtypeid = notificationtypes_cache[notificationtype_format]['notificationtypeid']
notification.axisnumber = foirequest["axisrequestid"]
notification.version = foirequest["version"]
notification.createdby = userid
Expand Down

0 comments on commit 6ab5bc1

Please sign in to comment.