aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorParker Berberian <pberberian@iol.unh.edu>2019-01-02 14:38:24 +0000
committerGerrit Code Review <gerrit@opnfv.org>2019-01-02 14:38:24 +0000
commit290101f5b9a7b6058b0b023042585b99c6d02ea6 (patch)
treee333bc16e4e411b05f2e745b78af3a4ed7f43f29 /src
parent7bf4f3794ebbf7b819d7db9f4d4522b7279169f5 (diff)
parent023f4acbcf81e4354044951a48e6e0c06a2ca50b (diff)
Merge "Fixes creation of ssh access job"
Diffstat (limited to 'src')
-rw-r--r--src/api/models.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/api/models.py b/src/api/models.py
index b6bd79f..cc25f82 100644
--- a/src/api/models.py
+++ b/src/api/models.py
@@ -343,7 +343,7 @@ class AccessConfig(TaskConfig):
user = models.ForeignKey(User, on_delete=models.CASCADE)
revoke = models.BooleanField(default=False)
context = models.TextField(default="")
- delta = models.TextField()
+ delta = models.TextField(default="{}")
def to_dict(self):
d = {}
@@ -691,12 +691,12 @@ class JobFactory(object):
config = AccessConfig()
config.access_type = access_type
config.user = user
- if context:
- config.set_context(context)
config.save()
relation.config = config
relation.save()
config.clear_delta()
+ if context:
+ config.set_context(context)
config.set_access_type(access_type)
config.set_revoke(revoke)
config.set_user(user)