mirror of
https://github.com/GSA/notifications-api.git
synced 2025-12-20 15:31:15 -05:00
Don’t re-expire old keys
If a key has already been expired we don’t want to lose the information about when that happened by giving it a new expiry date.
This commit is contained in:
@@ -70,7 +70,8 @@ def set_broadcast_service_type(service, service_mode, broadcast_channel, provide
|
||||
|
||||
# Revoke any API keys to avoid a regular API key being used to send alerts
|
||||
ApiKey.query.filter_by(
|
||||
service_id=service.id
|
||||
service_id=service.id,
|
||||
expiry_date=None,
|
||||
).update({
|
||||
ApiKey.expiry_date: datetime.utcnow()
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user