You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Somewhat related: I updated a project that was using EDTF v4 to test out the v5 branch and hit this error:
File "<...>/site-packages/edtf/fields.py", line 123, in update_values
direct_input = getattr(instance, self.direct_input_field, "")
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: attribute name must be string, not 'NoneType'
This is because I didn't have a direct_input_field defined. Is it reasonable to assume that implementers will have that field, or should we update the fields.py to handle this more gracefully? We should at least call it out in the readme and release notes.
Activity
Anticipate None for date_display #62
Merge pull request #63 from ixc/62_field_could_be_none
ColeDCrawford commentedon Jun 13, 2024
Somewhat related: I updated a project that was using EDTF v4 to test out the v5 branch and hit this error:
This is because I didn't have a
direct_input_fielddefined. Is it reasonable to assume that implementers will have that field, or should we update thefields.pyto handle this more gracefully? We should at least call it out in thereadmeand release notes.WIP adding checks for edtf field aliases #62
Tests for aliases that point to non-existent fields #62
aweakley commentedon Jun 27, 2024
I've made a PR #68 to add some Django checks for the field.