--- a/entities.py Wed Apr 23 12:22:19 2014 +0200
+++ b/entities.py Wed Apr 02 11:35:07 2014 +0200
@@ -204,7 +204,8 @@
def __json_encode__(self):
data = super(ProjectEnvironment, self).__json_encode__()
data['apycot_process_environment'] = self.apycot_process_environment()
- data['repository'] = self.repository
+ if self.repository:
+ data['repository'] = self.repository.__json_encode__()
data['apycot_configuration'] = self.apycot_configuration()
return data
@@ -466,8 +467,10 @@
def __json_encode__(self):
data = super(TestExecution, self).__json_encode__()
- data['environment'] = self.environment
- data['configuration'] = self.configuration
+ if self.environment:
+ data['environment'] = self.environment.__json_encode__()
+ if self.configuration:
+ data['configuration'] = self.configuration.__json_encode__()
return data
class CheckResult(AnyEntity):