SEBA-465 many2many should not have null= set

Change-Id: I6293e768cfc32bfbbec4fe29a27f1d0ee21fb344
diff --git a/VERSION b/VERSION
index e5c4368..440e866 100644
--- a/VERSION
+++ b/VERSION
@@ -1,2 +1,2 @@
-2.1.42
+2.1.43
 
diff --git a/containers/chameleon/Dockerfile.chameleon b/containers/chameleon/Dockerfile.chameleon
index 37753b0..2e7c9cb 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.42
+FROM xosproject/xos-base:2.1.43
 
 # xos-base already has protoc and dependencies installed
 
diff --git a/containers/xos/Dockerfile.client b/containers/xos/Dockerfile.client
index 4958607..99ebe8c 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.42
+FROM xosproject/xos-libraries:2.1.43
 
 # Install XOS client
 COPY lib/xos-api /tmp/xos-api
diff --git a/containers/xos/Dockerfile.libraries b/containers/xos/Dockerfile.libraries
index c3098ca..29d1bb9 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.42
+FROM xosproject/xos-base:2.1.43
 
 # Add libraries
 COPY lib /opt/xos/lib
diff --git a/containers/xos/Dockerfile.synchronizer-base b/containers/xos/Dockerfile.synchronizer-base
index a686281..4d52363 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.42
+FROM xosproject/xos-client:2.1.43
 
 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 fad2652..ee2d2d8 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.42
+FROM xosproject/xos-libraries:2.1.43
 
 # Install XOS
 ADD xos /opt/xos
diff --git a/lib/xos-genx/xosgenx/jinja2_extensions/django.py b/lib/xos-genx/xosgenx/jinja2_extensions/django.py
index d71ea51..724b85d 100644
--- a/lib/xos-genx/xosgenx/jinja2_extensions/django.py
+++ b/lib/xos-genx/xosgenx/jinja2_extensions/django.py
@@ -101,10 +101,18 @@
         "max_value",
     ]
 
-    # TODO evaluate if setting Null = False for all strings
-    m = {
-        "modifier": {"optional": True, "required": False, "_targets": ["null", "blank"]}
-    }
+    if f.get("link_type") == "manytomany":
+        # map for fields that do not support null
+        m = {
+            "modifier": {"optional": True, "required": False, "_targets": ["blank"]}
+        }
+    else:
+        # map for fields that do support null
+        # TODO evaluate if setting Null = False for all strings
+        m = {
+            "modifier": {"optional": True, "required": False, "_targets": ["null", "blank"]}
+        }
+
     out = {}
 
     for k, v in f["options"].items():
@@ -122,6 +130,8 @@
 
 
 def xproto_django_link_options_str(field, dport=None):
+    # Note that this function is called for links (ForeignKeys, M2Ms)
+
     output_dict = map_xproto_to_django(field)
 
     if dport and (dport == "+" or "+" not in dport):
@@ -203,6 +213,8 @@
 
 
 def xproto_django_options_str(field, dport=None):
+    # This function is called for non-links (Strings, Ints, Booleans, ...)
+
     output_dict = map_xproto_to_django(field)
 
     if dport == "_":