From 23edc90b815cb896bf8adadd8674557e09d0fa80 Mon Sep 17 00:00:00 2001 From: Claudio Maggioni Date: Mon, 16 Mar 2020 14:53:07 +0100 Subject: [PATCH] Fixed @tommi27 uniqueness frenzy for rooms MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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](https://gitlab.com/staccastacca/scuolatest/-/commit/dd0933def0262ce1ca2f2b006d4f7a364fb17272) ``` 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 ``` --- .gitlab-ci.yml | 2 ++ .../usi/inf/sa4/sanmarinoes/smarthut/models/Device.java | 8 ++------ .../ch/usi/inf/sa4/sanmarinoes/smarthut/models/Room.java | 2 +- 3 files changed, 5 insertions(+), 7 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index fc62202..2250a03 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -11,6 +11,8 @@ stages: smarthut_deploy: stage: deploy image: docker:latest + tags: + - dind services: - docker:dind variables: diff --git a/src/main/java/ch/usi/inf/sa4/sanmarinoes/smarthut/models/Device.java b/src/main/java/ch/usi/inf/sa4/sanmarinoes/smarthut/models/Device.java index c564914..6d0333d 100644 --- a/src/main/java/ch/usi/inf/sa4/sanmarinoes/smarthut/models/Device.java +++ b/src/main/java/ch/usi/inf/sa4/sanmarinoes/smarthut/models/Device.java @@ -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; diff --git a/src/main/java/ch/usi/inf/sa4/sanmarinoes/smarthut/models/Room.java b/src/main/java/ch/usi/inf/sa4/sanmarinoes/smarthut/models/Room.java index 68c3fc0..a30e4f8 100644 --- a/src/main/java/ch/usi/inf/sa4/sanmarinoes/smarthut/models/Room.java +++ b/src/main/java/ch/usi/inf/sa4/sanmarinoes/smarthut/models/Room.java @@ -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') */