cubicweb #2094462 crash when using create_entity with an empty related entity list [validation pending]

Here is the traceback:

File "/home/florent/Sccp/cubicweb/server/migractions.py", line 1359, in cmd_create_entity
  entity = self._cw.create_entity(etype, **kwargs)
File "/home/florent/Sccp/cubicweb/req.py", line 143, in create_entity
  return cls.cw_instantiate(self.execute, **kwargs)
File "/home/florent/Sccp/cubicweb/entity.py", line 516, in cw_instantiate
  {'x': created.eid}, build_descr=False)
File "/home/florent/Sccp/cubicweb/server/session.py", line 912, in execute
  rset = self._execute(self, rql, kwargs, build_descr)
File "/home/florent/Sccp/cubicweb/server/querier.py", line 691, in execute
  rqlst = self.parse(rql)
File "/home/florent/Sccp/cubicweb/server/querier.py", line 637, in parse
  return self._parse(unicode(rql), annotate=annotate)
File "/home/florent/Sccp/rql/__init__.py", line 88, in parse
  self._checker.check(rqlst)
File "/home/florent/Sccp/rql/stcheck.py", line 90, in check
  self._visit(node, state)
File "/home/florent/Sccp/rql/stcheck.py", line 106, in _visit
  self._visit(c, state)
File "/home/florent/Sccp/rql/stcheck.py", line 106, in _visit
  self._visit(c, state)
File "/home/florent/Sccp/rql/stcheck.py", line 106, in _visit
  self._visit(c, state)
File "/home/florent/Sccp/rql/stcheck.py", line 106, in _visit
  self._visit(c, state)
File "/home/florent/Sccp/rql/stcheck.py", line 101, in _visit
  node.accept(self, state)
File "<string>", line 1, in <lambda>
File "/home/florent/Sccp/rql/stcheck.py", line 423, in visit_function
  funcdescr.check_nbargs(len(function.children))
File "/home/florent/Sccp/logilab/database/__init__.py", line 382, in check_nbargs
  raise BadQuery('not enough argument for function %s' % cls.__name__)
BadQuery: not enough argument for function IN
instance sccp not upgraded: not enough argument for function IN
priorityminor
typebug
done in3.14.4
load0.100
load left0.000
closed by#fb5c0e60a615 [entity] fix crash when using cw_instantiate with empty related entity list; closes #2094462