SEBA-222 Fix default owner support
Change-Id: I068ad4a573e8d88b477bc59effbff406141613b1
diff --git a/VERSION b/VERSION
index 693a232..e5c4368 100644
--- a/VERSION
+++ b/VERSION
@@ -1,2 +1,2 @@
-2.1.41
+2.1.42
diff --git a/containers/chameleon/Dockerfile.chameleon b/containers/chameleon/Dockerfile.chameleon
index cc83a90..37753b0 100644
--- a/containers/chameleon/Dockerfile.chameleon
+++ b/containers/chameleon/Dockerfile.chameleon
@@ -13,7 +13,7 @@
# limitations under the License.
# xosproject/chameleon
-FROM xosproject/xos-base:2.1.41
+FROM xosproject/xos-base:2.1.42
# xos-base already has protoc and dependencies installed
diff --git a/containers/xos/Dockerfile.client b/containers/xos/Dockerfile.client
index 1a9a4eb..4958607 100644
--- a/containers/xos/Dockerfile.client
+++ b/containers/xos/Dockerfile.client
@@ -13,7 +13,7 @@
# limitations under the License.
# xosproject/xos-client
-FROM xosproject/xos-libraries:2.1.41
+FROM xosproject/xos-libraries:2.1.42
# Install XOS client
COPY lib/xos-api /tmp/xos-api
diff --git a/containers/xos/Dockerfile.libraries b/containers/xos/Dockerfile.libraries
index 13e555d..c3098ca 100644
--- a/containers/xos/Dockerfile.libraries
+++ b/containers/xos/Dockerfile.libraries
@@ -13,7 +13,7 @@
# limitations under the License.
# xosproject/xos-libraries
-FROM xosproject/xos-base:2.1.41
+FROM xosproject/xos-base:2.1.42
# Add libraries
COPY lib /opt/xos/lib
diff --git a/containers/xos/Dockerfile.synchronizer-base b/containers/xos/Dockerfile.synchronizer-base
index 397de0d..a686281 100644
--- a/containers/xos/Dockerfile.synchronizer-base
+++ b/containers/xos/Dockerfile.synchronizer-base
@@ -13,7 +13,7 @@
# limitations under the License.
# xosproject/xos-synchronizer-base
-FROM xosproject/xos-client:2.1.41
+FROM xosproject/xos-client:2.1.42
COPY xos/synchronizers/new_base /opt/xos/synchronizers/new_base
COPY xos/xos/logger.py /opt/xos/xos/logger.py
diff --git a/containers/xos/Dockerfile.xos-core b/containers/xos/Dockerfile.xos-core
index dbf8fab..fad2652 100644
--- a/containers/xos/Dockerfile.xos-core
+++ b/containers/xos/Dockerfile.xos-core
@@ -13,7 +13,7 @@
# limitations under the License.
# xosproject/xos-core
-FROM xosproject/xos-libraries:2.1.41
+FROM xosproject/xos-libraries:2.1.42
# Install XOS
ADD xos /opt/xos
diff --git a/xos/core/models/serviceinstance.py b/xos/core/models/serviceinstance.py
index 10abd3f..b3df59a 100644
--- a/xos/core/models/serviceinstance.py
+++ b/xos/core/models/serviceinstance.py
@@ -84,11 +84,15 @@
id=self._meta.get_field("owner").default
)
- def save(self, *args, **kwargs):
- # NOTE(CORD-3128): Only set the owner if not in deleted state.
+ def full_clean(self, *args, **kwargs):
+ # NOTE: SEBA-222 Must be called before full_clean, otherwise a non-null violation will occur if the
+ # owner is None.
if not self.deleted:
self.set_owner()
+ super(ServiceInstance,self).full_clean()
+
+ def save(self, *args, **kwargs):
# If the model has a Creator and it's not specified, then attempt to default to the Caller. Caller is
# automatically filled in my the API layer. This code was typically used by ServiceInstances that lead to
# instance creation.