Conditions | 2 |
Total Lines | 10 |
Code Lines | 5 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | from django.db import models |
||
23 | def to_dict(self): |
||
24 | ''' |
||
25 | Returns the specific node configurations in this graph configuration |
||
26 | as JSON dictionary data structure. The keys are node client ID's, so that the |
||
27 | JS code can identify them. |
||
28 | ''' |
||
29 | result = {} |
||
30 | for node_conf in self.node_configurations.all(): |
||
31 | result[node_conf.node.client_id] = json.loads(node_conf.setting) |
||
32 | return result |
||
33 |