diff options
author | Parker Berberian <pberberian@iol.unh.edu> | 2019-01-02 14:38:24 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@opnfv.org> | 2019-01-02 14:38:24 +0000 |
commit | 8c14ce442ff11f024c0d7318120dad71e7e91215 (patch) | |
tree | 05e41f68ceceb606ffd35c4d12d3538a64e9b039 /dashboard/src | |
parent | 0633b9f6a1b4e430888360edc35e403b1b6d341c (diff) | |
parent | 2f272e3878c99ca64eaed8ca7b5e1de85c792eb5 (diff) |
Merge "Fixes creation of ssh access job"
Diffstat (limited to 'dashboard/src')
-rw-r--r-- | dashboard/src/api/models.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/dashboard/src/api/models.py b/dashboard/src/api/models.py index b6bd79f..cc25f82 100644 --- a/dashboard/src/api/models.py +++ b/dashboard/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) |