diff --git a/auth-api/src/auth_api/services/activity_log.py b/auth-api/src/auth_api/services/activity_log.py index 9a96da217..6eb5e80d4 100644 --- a/auth-api/src/auth_api/services/activity_log.py +++ b/auth-api/src/auth_api/services/activity_log.py @@ -79,9 +79,9 @@ def fetch_activity_logs(org_id: int, **kwargs): # pylint: disable=too-many-loca activity_log: ActivityLogModel = result[0] log_dict = ActivityLogSchema(exclude=('actor_id',)).dump(activity_log) - if user := result[1]: - actor = ActivityLog._mask_user_name(is_staff_access, user) - log_dict['actor'] = actor + user = result[1] + actor = ActivityLog._mask_user_name(is_staff_access, user) + log_dict['actor'] = actor log_dict['action'] = ActivityLog._build_string(activity_log) logs['activity_logs'].append(log_dict) @@ -208,6 +208,8 @@ def _removing_products_and_services(activity: ActivityLogModel) -> str: @ staticmethod def _mask_user_name(is_staff_access, user): + if user is None: + return 'Service Account' is_actor_a_staff = user.type == Role.STAFF.name if not is_staff_access and is_actor_a_staff: actor = 'BC Registry Staff' diff --git a/auth-web/src/components/pay/PayWithCreditCard.vue b/auth-web/src/components/pay/PayWithCreditCard.vue index 3e2dddc2c..41162681a 100644 --- a/auth-web/src/components/pay/PayWithCreditCard.vue +++ b/auth-web/src/components/pay/PayWithCreditCard.vue @@ -4,8 +4,8 @@

Balance Due: ${{totalBalanceDue.toFixed(2)}}