Closed the-mars-rover closed 1 month ago
Thanks! This should be an easy fix
Thanks! This should be an easy fix
Awesome!
I'm no expert in Thymeleaf but, if I have time, I'll also try make a small contribution and submit a PR :-)
Also, while I'm here: awesome project man.
Thank you, I really appreciate it!
If you want to try and fix it you should do as follows: where you see the code
object != null ? object.traverse(field).getPrimaryKeyValue() : ''
It also need to return the empty string if object.traverse(field)
is null as well :)
Thank you, I really appreciate it!
If you want to try and fix it you should do as follows: where you see the code
object != null ? object.traverse(field).getPrimaryKeyValue() : ''
It also need to return the empty string if
object.traverse(field)
is null as well :)
PR Submitted: https://github.com/aileftech/snap-admin/pull/50 :-)
Describe the bug When an entity has a nullable @OneToOne relationship with another entity, editing the entity leads to a Thymeleaf error (see stack trace below) and problems in displaying the edit page (see screenshot below).
Is the bug at startup before you perform any action? No
Stacktrace
@Entity code
application.properties snapadmin.enabled=true snapadmin.baseUrl=admin snapadmin.modelsPackage=org.persons.entity
Additional context When attempting to edit a Person without a Phone (ie. when encountering the above stack trace), the Edit page is cut off: