equal
deleted
inserted
replaced
344 entity.put() |
344 entity.put() |
345 |
345 |
346 # return the scope |
346 # return the scope |
347 return entity.scope |
347 return entity.scope |
348 |
348 |
|
349 def hasAtLeastOneRecord(self, survey_entity): |
|
350 """Returns True iff the given Survey has at least one SurveyRecord. |
|
351 |
|
352 Args: |
|
353 survey_entity: a Survey instance |
|
354 """ |
|
355 |
|
356 fields = {'survey': survey_entity} |
|
357 |
|
358 record_logic = self.getRecordLogic() |
|
359 return record_logic.getQueryForFields(fields).count(1) > 0 |
|
360 |
349 def _onCreate(self, entity): |
361 def _onCreate(self, entity): |
350 """Set the scope of the survey. |
362 """Set the scope of the survey. |
351 """ |
363 """ |
352 |
364 |
353 self.getScope(entity) |
365 self.getScope(entity) |