Uh oh!
There was an error while loading. Please reload this page.
fix: searchfilter with nested custom identifiers - #5760
Conversation
76139cc to
42f767dCompare| $item = $this->getIriConverter()->getResourceFromIri($value, ['fetch_data' => false]); | ||
| return $this->propertyAccessor->getValue($item, $associationFieldIdentifier); | ||
| } catch (InvalidArgumentException) { |
There was a problem hiding this comment.
not good for performances, isn't there a way to prevent this exception?
There was a problem hiding this comment.
yep, that's not great for perfs but i can't see another way to check whether what i have is a valid IRI beforehand. That should not change much performance-wise though; I actually copied this logic from SearchFilterTrait::getIdFromValue, which was called before :
core/src/Doctrine/Common/Filter/SearchFilterTrait.php
Lines 121 to 132 in b58ec12
| return $this->propertyAccessor->getValue($item, $associationFieldIdentifier); | ||
| } catch (InvalidArgumentException) { | ||
| /* |
There was a problem hiding this comment.
I actually have another version that handle that case better, but i'll leave it for another PR since it needs quite a lot more to work.
There was a problem hiding this comment.
don't worry let's go for this I think it's just find and maybe we can do better when working on #2400 next year!
soyuka
commented
Aug 22, 2023
could you rebase though? Thanks! |
42f767d to
b7044d8Compareb7044d8 to
5f09a6aComparemrossard
commented
Aug 22, 2023
Done! |
soyuka
commented
Aug 23, 2023
perfect thanks and @dannyvw tried on his project so fingers crossed :p |
This undoes the revert of #5623 , but (as far as i can see) fixes the part that was causing #5735