Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/sugar_network/model/context.py
diff options
context:
space:
mode:
Diffstat (limited to 'sugar_network/model/context.py')
-rw-r--r--sugar_network/model/context.py15
1 files changed, 6 insertions, 9 deletions
diff --git a/sugar_network/model/context.py b/sugar_network/model/context.py
index 41bf46b..a9962a9 100644
--- a/sugar_network/model/context.py
+++ b/sugar_network/model/context.py
@@ -102,15 +102,12 @@ class Context(db.Resource):
else:
return value[0]
- @db.indexed_property(prefix='K', typecast=bool, default=False,
- acl=ACL.READ | ACL.LOCAL)
- def favorite(self, value):
- return value
-
- @db.indexed_property(prefix='L', typecast=[0, 1, 2], default=0,
- acl=ACL.READ | ACL.LOCAL)
- def clone(self, value):
- return value
+ @reviews.setter
+ def reviews(self, value):
+ if isinstance(value, int):
+ return [value, 0]
+ else:
+ return value
@db.stored_property(typecast=[], default=[], acl=ACL.PUBLIC | ACL.LOCAL)
def dependencies(self, value):