mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-20 22:40:31 -04:00
Make existing_keys a required argument
Because we should always expect its presence, even it’s an empty list. And because having mutable default arguments can have nasty side effects.
This commit is contained in:
@@ -525,7 +525,7 @@ class ChooseTimeForm(StripWhitespaceForm):
|
||||
|
||||
|
||||
class CreateKeyForm(StripWhitespaceForm):
|
||||
def __init__(self, existing_keys=[], *args, **kwargs):
|
||||
def __init__(self, existing_keys, *args, **kwargs):
|
||||
self.existing_key_names = [
|
||||
key['name'].lower() for key in existing_keys
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user