Closed jstejada closed 8 years ago
This diff LGTM for the most part—thanks for cleaning things up! I left a few minor comments inline, and I would also love to see a unit test for the custom comparator type.
@spang, @bengotow, addressed your comments and made the custom string type more generic as per discussion with ben -- it might be worth reusing for stuff like filename truncation. Also added some unit tests. Could you take a look at this latest diff? It seems that the bot didn't catch spang's lgtm.
This is really nice. Thanks for cleaning up the duplicate logic! I think in the future we should definitely consider using StringWithTransform
for filenames and other things. Doing a quick grep for [:
it looks like there are several other places where we're guarding against string length that might be better placed into ORM-level transforms 👍
Ship it! LGTM
I like it! looking forward to more changes that make the codebase easier to understand and work with and it harder for us to introduce bugs :) :+1:
__eq__
comparison to compare against the truncated string, which is what we actually store in the database, even if the user queries using a longer (original) name. Going forward, any queries by name will now compare against the correct string.