def get(self, shot_id): shot = shots_service.get_shot(shot_id) user_service.check_project_access(shot["project_id"]) user_service.check_entity_access(shot["id"]) return shots_service.get_shot_versions(shot_id)
def get_tasks_for_shot(shot_id, relations=False): """ Get all tasks for given shot. """ shot = shots_service.get_shot(shot_id) return get_task_dicts_for_entity(shot["id"], relations=relations)
def delete(self, scene_id, shot_id): scene = shots_service.get_scene(scene_id) user_service.check_project_access(scene["project_id"]) shot = shots_service.get_shot(shot_id) scenes_service.remove_shot_from_scene(scene, shot) return "", 204
def is_exist(self, shot_id): return shots_service.get_shot(shot_id) is not None
def get_tasks_for_shot(shot_id): """ Get all tasks for given shot. """ shot = shots_service.get_shot(shot_id) return get_task_dicts_for_entity(shot["id"])
def get(self, shot_id): shots_service.get_shot(shot_id) return user_service.get_task_types_for_entity(shot_id)
def test_get_shot(self): self.assertEqual(str(self.shot.id), shots_service.get_shot(self.shot.id)["id"])