Fix depth method to works with new record without calculated attributes
Fir problem with attr_readonly for parent foreign key