graphiti icon indicating copy to clipboard operation
graphiti copied to clipboard

Consistent behaviour for empty polymorphic

Open mkamensky opened this issue 5 years ago • 2 comments

This is just a small issue, but I would expect

    self.polymorphic = []

to behave the same as no assignment at all. Instead, the behaviour changes, since the Polymorphism module is included (in Graphiti::Resource::Configuration)

mkamensky avatar Jan 19 '20 09:01 mkamensky

Would happily merge a PR for this!

richmolj avatar Jan 21 '20 14:01 richmolj

I'm not sure what the correct thing here should be, the obvious thing would be to avoid loading Polymorphism in the assignment when the array is empty, but I imagine it could become empty later (or conversely, become non-empty by some other means), so it seems that the behaviour should be modified elsewhere

mkamensky avatar Jan 22 '20 14:01 mkamensky