Example #1
0
 def delete_taskversions(self, modifier_id, task_id=None, version_id=None, is_affected=None):
     if task_id is None and version_id is None:
         raise CoreError("the task_id and version_id can't be None at the same time.")
     query = TaskVersion.all()
     if task_id is not None:
         query.filter("task_id =", task_id)
     if version_id is not None:
         query.filter("version_id =", version_id)
     if is_affected != None:
         query.filter("is_affected =", is_affected)
     return query.delete(modifier_id)
Example #2
0
 def fetch_taskversions(self, task_id, is_affected):
     query = TaskVersion.all()
     query.filter("task_id =", task_id)
     query.filter("is_affected =", is_affected)
     return query.fetch()
Example #3
0
 def has_taskversion(self, task_id, version_id, is_affected):
     query = TaskVersion.all()
     query.filter("task_id =", task_id)
     query.filter("version_id =", version_id)
     query.filter("is_affected =", is_affected)
     return query.count() > 0
Example #4
0
 def delete_taskversion(self, task_id, version_id, is_affected, modifier_id):
     query = TaskVersion.all()
     query.filter("task_id =", task_id)
     query.filter("version_id =", version_id)
     query.filter("is_affected =", is_affected)
     return query.delete(modifier_id)