fix failing Py test due to backend change (#10749)

This commit is contained in:
Mohit Yadav 2023-03-24 17:41:52 +05:30 committed by GitHub
parent 218e07808a
commit fb02cbfeed
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -511,7 +511,9 @@ public abstract class EntityRepository<T extends EntityInterface> {
setFieldsInternal(original, putFields);
EntityReference updatedOwner = updated.getOwner();
if (updatedOwner != null && updatedOwner.getDescription().equals("inherited")) {
if (updatedOwner != null
&& updatedOwner.getDescription() != null
&& updatedOwner.getDescription().equals("inherited")) {
// Don't let inherited ownership overwrite existing ownership
updated.setOwner(original.getOwner() != null ? original.getOwner() : updatedOwner);
}