fix: only add contract to test-agents if missing
authorFelix Dörre <felix@dogcraft.de>
Tue, 31 Mar 2020 14:34:13 +0000 (16:34 +0200)
committerFelix Dörre <felix@dogcraft.de>
Tue, 31 Mar 2020 14:34:13 +0000 (16:34 +0200)
Change-Id: Ia0f45a1dd43bab70b08ad886c9cd971f05e1d6f6

util-testing/club/wpia/gigi/pages/Manager.java

index 0ca6119..bed5097 100644 (file)
@@ -167,7 +167,9 @@ public class Manager extends Page {
                 ps.setString(6, getRandomCountry().getCode());
                 ps.execute();
             }
-            new Contract(u, ContractType.RA_AGENT_CONTRACT);
+            if ( !Contract.hasSignedContract(u, ContractType.RA_AGENT_CONTRACT)) {
+                new Contract(u, ContractType.RA_AGENT_CONTRACT);
+            }
             return u;
         }
     }