actually it should be like this only: !parent.error && parent.metadata != null
because parent will be returned from graasp [ruby controller], and if there is smth wrong error will not be null and if there is no metadata the only possible value is null.

will change it