diff options
| -rw-r--r-- | dozentenmodul/src/main/java/org/openslx/dozmod/thrift/ThriftActions.java | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/dozentenmodul/src/main/java/org/openslx/dozmod/thrift/ThriftActions.java b/dozentenmodul/src/main/java/org/openslx/dozmod/thrift/ThriftActions.java index 7caec6c0..36486b8a 100644 --- a/dozentenmodul/src/main/java/org/openslx/dozmod/thrift/ThriftActions.java +++ b/dozentenmodul/src/main/java/org/openslx/dozmod/thrift/ThriftActions.java @@ -123,9 +123,15 @@ public class ThriftActions { } } } - sat = SatelliteListWindow.open(window, data.satellites); - if (sat == null) - return false; + // after removing the test sats, check if we have only one left and directly use that + // instead of asking the user + if (data.satellites.size() != 1) { + sat = SatelliteListWindow.open(window, data.satellites); + if (sat == null) + return false; + } else { + sat = data.satellites.get(0); + } } if (sat.addressList == null || sat.addressList.isEmpty()) { |
