mirror of
https://github.com/GSA/notifications-api.git
synced 2026-08-03 21:20:47 -04:00
Removed contented updates the notifications stats table
- As before this is now driven from the notifications history table - Removed from updates and create - Signatures changes to removed unused params hits many files - Also potential issue around rate limiting - we used to get the number sent per day from the stats table - which was a single row lookup, now we have to count this. This applies to EVERY API CALL. Probably not a good thing and should be addressed urgently.
This commit is contained in:
@@ -491,7 +491,9 @@ class NotificationHistory(db.Model):
|
||||
|
||||
@classmethod
|
||||
def from_notification(cls, notification):
|
||||
return cls(**{c.name: getattr(notification, c.name) for c in cls.__table__.columns})
|
||||
history = cls(**{c.name: getattr(notification, c.name) for c in cls.__table__.columns})
|
||||
history.template = notification.template
|
||||
return history
|
||||
|
||||
def update_from_notification(self, notification):
|
||||
for c in self.__table__.columns:
|
||||
|
||||
Reference in New Issue
Block a user