Fixed @tommi27 uniqueness frenzy for rooms

I have now discovered the Schadenfreude in using git-blame. To quote an
old commit message from high school:

[Trascrizione domande fisica e correzione di GRAVISSIMI bug presenti nel
codici di Maggioni](dd0933def0)

```
La trascrizione dei test è stata fatta in modo certosino, simile a
quello dei monaci emanuensi.
I GRAVISSIMI buggg (3 g perchè fa faigo) potevano rendere il sito
incomprensibile
```
This commit is contained in:
Claudio Maggioni 2020-03-16 14:53:07 +01:00
parent a79c5d8671
commit 23edc90b81
3 changed files with 5 additions and 7 deletions

View File

@ -11,6 +11,8 @@ stages:
smarthut_deploy:
stage: deploy
image: docker:latest
tags:
- dind
services:
- docker:dind
variables:

View File

@ -49,17 +49,13 @@ public abstract class Device {
* The name for the category of this particular device (e.g 'dimmer'). Not stored in the
* database but set thanks to constructors
*/
@ApiModelProperty(hidden = true)
@Transient
private final String kind;
@Transient private final String kind;
/**
* The way this device behaves in the automation flow. Not stored in the database but set thanks
* to constructors
*/
@ApiModelProperty(hidden = true)
@Transient
private final FlowType flowType;
@Transient private final FlowType flowType;
public long getId() {
return id;

View File

@ -139,7 +139,7 @@ public class Room {
* inserting from a REST call.
*/
@NotNull
@Column(name = "user_id", nullable = false, unique = true)
@Column(name = "user_id", nullable = false)
private Long userId;
/** The user given name of this room (e.g. 'Master bedroom') */