[web/autoform] fix regression introduced by #5758ba784ebd
The changes from cset 5758ba784ebd "[autoform] when building inlined-form view
for a relation, consider related entities intead of other views" lead to
an unexpected 'add new' link on creation of an entity with inlined form for
a relation of cardinality 1. To avoid this, we should consider formviews and not
existing relations when the entity is being created.
Closes #10860258
from cubicweb.predicates import is_instance
from cubicweb.hooks import notification
class FolderUpdateHook(notification.EntityUpdateHook):
__select__ = (notification.EntityUpdateHook.__select__ &
is_instance('Folder'))
order = 100 # late trigger so that metadata hooks come before.