Exemplo n.º 1
0
 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)
Exemplo n.º 2
0
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)
Exemplo n.º 3
0
 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
Exemplo n.º 4
0
 def is_exist(self, shot_id):
     return shots_service.get_shot(shot_id) is not None
Exemplo n.º 5
0
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"])
Exemplo n.º 6
0
 def get(self, shot_id):
     shots_service.get_shot(shot_id)
     return user_service.get_task_types_for_entity(shot_id)
Exemplo n.º 7
0
 def test_get_shot(self):
     self.assertEqual(str(self.shot.id),
                      shots_service.get_shot(self.shot.id)["id"])