Code Review
/
pharos-tools.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
review
|
tree
raw
|
patch
| inline |
side by side
(parent:
bf839cd
)
Fix API serialization
03/66203/1
author
Parker Berberian
<pberberian@iol.unh.edu>
Fri, 4 Jan 2019 16:29:00 +0000
(11:29 -0500)
committer
Parker Berberian
<pberberian@iol.unh.edu>
Fri, 4 Jan 2019 16:29:00 +0000
(11:29 -0500)
Under special circumstances, the 'context' field may be empty and serialization will fail,
but that field is optional so we will ignore errors.
Change-Id: I2e1e47a2f7d507e45b171f80aa241c8026cfc1a5
Signed-off-by: Parker Berberian <pberberian@iol.unh.edu>
dashboard/src/api/models.py
patch
|
blob
|
history
diff --git
a/dashboard/src/api/models.py
b/dashboard/src/api/models.py
index
cc25f82
..
a1fedfe
100644
(file)
--- a/
dashboard/src/api/models.py
+++ b/
dashboard/src/api/models.py
@@
-350,7
+350,10
@@
class AccessConfig(TaskConfig):
d['access_type'] = self.access_type
d['user'] = self.user.id
d['revoke'] = self.revoke
- d['context'] = json.loads(self.context)
+ try:
+ d['context'] = json.loads(self.context)
+ except:
+ pass
return d
def get_delta(self):