cubicweb #2741643 crash on add_etype('Foo') under specific circumstances [validation pending]

IF I have added a type to META_RTYPES AND there is no rdef for all couples of ETYPES in the schema

the operation will crash:

>>> add_entity_type('Foo')
Traceback (most recent call last):
 File "<console>", line 1, in <module>
 File "/home/auc/confs/elea/cubicweb/server/migractions.py", line 860, in cmd_add_entity_type
   self.commit()
 File "/home/auc/confs/elea/cubicweb/server/migractions.py", line 312, in commit
   self._cnx.commit()
 File "/home/auc/confs/elea/cubicweb/dbapi.py", line 544, in decorator
   return func(self, *args, **kwargs)
 File "/home/auc/confs/elea/cubicweb/dbapi.py", line 770, in commit
   return self._repo.commit(self.sessionid, **self._txid())
 File "/home/auc/confs/elea/cubicweb/server/repository.py", line 848, in commit
   return session.commit()
 File "/home/auc/confs/elea/cubicweb/server/session.py", line 951, in commit
   operation.handle_event('precommit_event')
 File "/home/auc/confs/elea/cubicweb/server/hook.py", line 770, in handle_event
   getattr(self, event)()
 File "/home/auc/confs/elea/cubicweb/hooks/syncschema.py", line 275, in precommit_event
   rdef = copy(rschema.rdef(sampletype, desttype))
 File "/home/auc/confs/elea/yams/schema.py", line 896, in rdef
   raise KeyError('%s %s %s' % (subject, self, object))
KeyError: 'ParameterValueFloat container_parent ResourceQueue'
priorityimportant
typebug
done in3.15.10
load0.500
load left0.000
closed by#ab0cd0765076 [hooks/syncschema] do not crash when adding a new entity type (closes #2741643)
patch[hooks/syncschema] do not crash when adding a new entity type (closes #2741643) [applied]