Allows set_key command to set keys that already exists
parent
9aa586181e
commit
33642190cb
|
@ -6,6 +6,7 @@ class Command(BaseCommand):
|
|||
args = "<name> <value>"
|
||||
|
||||
def handle(self, name, value, **options):
|
||||
k = Key.objects.create(name=name, value=value)
|
||||
(k, created) = Key.objects.get_or_create(name=name)
|
||||
k.value = value
|
||||
k.save()
|
||||
|
||||
|
|
Loading…
Reference in New Issue