Fixed remnant bug from changed behavior in python 2 where int < None … - #186
Conversation
…would evaluate to False rather than a ValueError. Manifested when openning another user's user folders
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #186 +/- ##
===========================================
+ Coverage 0 32.55% +32.55%
===========================================
Files 0 68 +68
Lines 0 7688 +7688
===========================================
+ Hits 0 2503 +2503
- Misses 0 5185 +5185
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
| ): | ||
| # opening a publish and either not showing work files or the file isn't local | ||
| if self.file.version < max_publish_version: | ||
| if max_publish_version and self.file.version < max_publish_version: |
There was a problem hiding this comment.
I understand that the change of behaviour between Python 2 and 3 with Int<None and I agree this fix makes sense.
However, I am unable to find a way to reproduce this problem.
I mean, if max_publish_version is None, that means there are no file_versions with is_published. In this situation, the condition on L54 (and self.file.is_published) will never pass so we never get to this line.
Would it be possible to provide reproduction steps for this issue, please?
…would evaluate to False rather than a ValueError. Manifested when openning another user's user folders