File tree Expand file tree Collapse file tree
src/org/openlowcode/server/data/properties Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -66,7 +66,7 @@ public void postprocStoredobjectInsert(E object) {
6666 // creates the companion object.
6767 ChoiceValue <F > value = typeddefinition .getTypeChoice ().parseChoiceValue (type .getPayload ());
6868 CompanionInterface <?, E , F > blankcompanion = typeddefinition .getHelper ().generateBlankCompanion (value );
69- blankcompanion .insertcompanion (object );
69+ if ( blankcompanion != null ) blankcompanion .insertcompanion (object );
7070 }
7171
7272 /**
Original file line number Diff line number Diff line change @@ -37,7 +37,8 @@ public TypedHelper() {
3737 public CompanionInterface <?,E ,F > generateBlankCompanion (ChoiceValue <F > type ) {
3838 if (type ==null ) throw new RuntimeException ("Provided choice is null" );
3939 Supplier <CompanionInterface <?,E ,F >> supplier = suppliersbytype .get (type );
40- if (supplier ==null ) throw new RuntimeException ("No supplier found for type " +type .getDisplayValue ());
40+ // typed should work if for some types, companion is not present
41+ if (supplier ==null ) return null ;
4142 return supplier .get ();
4243 }
4344
You can’t perform that action at this time.
0 commit comments