fixed some stuff not working on automations

This commit is contained in:
Christian Capeáns Pérez 2020-04-27 17:03:17 +02:00
parent 60c057ce5b
commit c1147f02ae
2 changed files with 1 additions and 5 deletions

View file

@ -24,10 +24,6 @@ public class ScenePriorityController {
@Autowired ScenePriorityRepository scenePriorityRepository; @Autowired ScenePriorityRepository scenePriorityRepository;
@GetMapping("/{id}")
public ScenePriority get(@PathVariable long id) throws NotFoundException {
return scenePriorityRepository.findById(id).orElseThrow(NotFoundException::new);
}
@GetMapping("/{automationId}") @GetMapping("/{automationId}")
public List<ScenePriority> getByAutomationId(@PathVariable long automationId) public List<ScenePriority> getByAutomationId(@PathVariable long automationId)

View file

@ -41,7 +41,7 @@ public class ScenePriority {
@GsonExclude @GsonExclude
private Scene scene; private Scene scene;
@Column(name = "scene_id", nullable = false, updatable = false, unique = true) @Column(name = "scene_id", nullable = false, updatable = false)
@NotNull @NotNull
private Long sceneId; private Long sceneId;