mirror of
https://github.com/dalbodeule/snap-admin.git
synced 2025-08-12 14:51:13 +00:00
fix(0.2.2): issue #49 (null pointer exception with optional @OneToOne relationships).
This commit is contained in:
@@ -43,7 +43,7 @@
|
||||
<th:block th:if="${field.isForeignKey()}">
|
||||
<div th:replace="~{snapadmin/fragments/forms :: input_autocomplete(field=${field}, value=${
|
||||
create ? (params != null ? params.getOrDefault(field.getName(), '') : '')
|
||||
: (object != null ? object.traverse(field).getPrimaryKeyValue() : '' )
|
||||
: (object != null && object.traverse(field) != null ? object.traverse(field).getPrimaryKeyValue() : '' )
|
||||
})}">
|
||||
</div>
|
||||
</th:block>
|
||||
|
Reference in New Issue
Block a user