def get(self, shot_id): """ Retrieve all asset shots for given soht. """ shot = shots_service.get_shot(shot_id) user_service.check_project_access(shot["project_id"]) return assets_service.get_asset_types_for_shot(shot_id)
def get(self, shot_id): """ Retrieve all asset shots for given soht. """ shot = shots_service.get_shot(shot_id) if not permissions.has_manager_permissions(): user_service.check_has_task_related(shot["project_id"]) asset_types = assets_service.get_asset_types_for_shot(shot_id) return asset_types
def get(self, shot_id): """ Retrieve all asset shots for given shot. --- tags: - Assets parameters: - in: path name: shot_id schema: type: UUID example: a24a6ea4-ce75-4665-a070-57453082c25 required: True responses: 200: description: All asset shots for given shot """ shot = shots_service.get_shot(shot_id) user_service.check_project_access(shot["project_id"]) return assets_service.get_asset_types_for_shot(shot_id)
def test_get_asset_types_for_shot(self): self.shot.entities_out = [self.entity] self.shot.save() asset_types = assets_service.get_asset_types_for_shot(self.shot.id) self.assertEqual(len(asset_types), 1) self.assertEqual(asset_types[0]["name"], "Props")