{"comment":{"url":"https://api.github.com/repos/czlee/tabbycat/comments/18736473","html_url":"https://github.com/czlee/tabbycat/commit/bac49a123f6423220eb4e2719a584213c9dcb040#commitcomment-18736473","id":18736473,"user":{"login":"philipbelesky","id":495961,"avatar_url":"https://avatars.githubusercontent.com/u/495961?v=3","gravatar_id":"","url":"https://api.github.com/users/philipbelesky","html_url":"https://github.com/philipbelesky","followers_url":"https://api.github.com/users/philipbelesky/followers","following_url":"https://api.github.com/users/philipbelesky/following{/other_user}","gists_url":"https://api.github.com/users/philipbelesky/gists{/gist_id}","starred_url":"https://api.github.com/users/philipbelesky/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/philipbelesky/subscriptions","organizations_url":"https://api.github.com/users/philipbelesky/orgs","repos_url":"https://api.github.com/users/philipbelesky/repos","events_url":"https://api.github.com/users/philipbelesky/events{/privacy}","received_events_url":"https://api.github.com/users/philipbelesky/received_events","type":"User","site_admin":false},"position":null,"line":null,"path":null,"commit_id":"bac49a123f6423220eb4e2719a584213c9dcb040","created_at":"2016-08-23T03:29:17Z","updated_at":"2016-08-23T03:29:17Z","body":"@czlee For context here was the test failure:\r\n\r\n```\r\n======================================================================\r\nERROR: test_invalid_line (importer.tests.test_anorak.TestImporterAnorak)\r\n----------------------------------------------------------------------\r\nTraceback (most recent call last):\r\n  File \"/Users/philip/Sites/tc_dev/tabbycat/importer/tests/test_anorak.py\", line 119, in test_invalid_line\r\n    counts, errors = self.importer.import_adjudicators(f)\r\n  File \"/Users/philip/Sites/tc_dev/tabbycat/importer/anorak.py\", line 254, in import_adjudicators\r\n    counts, errors = self._import(f, pm.Adjudicator, adjudicator_interpreter)\r\n  File \"/Users/philip/Sites/tc_dev/tabbycat/importer/base.py\", line 239, in _import\r\n    inst = model.objects.get(**kwargs)\r\n  File \"/Users/philip/Sites/tc_dev/venv/lib/python3.5/site-packages/django/db/models/manager.py\", line 85, in manager_method\r\n    return getattr(self.get_queryset(), name)(*args, **kwargs)\r\n  File \"/Users/philip/Sites/tc_dev/venv/lib/python3.5/site-packages/django/db/models/query.py\", line 376, in get\r\n    clone = self.filter(*args, **kwargs)\r\n  File \"/Users/philip/Sites/tc_dev/venv/lib/python3.5/site-packages/django/db/models/query.py\", line 794, in filter\r\n    return self._filter_or_exclude(False, *args, **kwargs)\r\n  File \"/Users/philip/Sites/tc_dev/venv/lib/python3.5/site-packages/django/db/models/query.py\", line 812, in _filter_or_exclude\r\n    clone.query.add_q(Q(*args, **kwargs))\r\n  File \"/Users/philip/Sites/tc_dev/venv/lib/python3.5/site-packages/django/db/models/sql/query.py\", line 1227, in add_q\r\n    clause, _ = self._add_q(q_object, self.used_aliases)\r\n  File \"/Users/philip/Sites/tc_dev/venv/lib/python3.5/site-packages/django/db/models/sql/query.py\", line 1253, in _add_q\r\n    allow_joins=allow_joins, split_subq=split_subq,\r\n  File \"/Users/philip/Sites/tc_dev/venv/lib/python3.5/site-packages/django/db/models/sql/query.py\", line 1187, in build_filter\r\n    condition = self.build_lookup(lookups, col, value)\r\n  File \"/Users/philip/Sites/tc_dev/venv/lib/python3.5/site-packages/django/db/models/sql/query.py\", line 1083, in build_lookup\r\n    return final_lookup(lhs, rhs)\r\n  File \"/Users/philip/Sites/tc_dev/venv/lib/python3.5/site-packages/django/db/models/lookups.py\", line 19, in __init__\r\n    self.rhs = self.get_prep_lookup()\r\n  File \"/Users/philip/Sites/tc_dev/venv/lib/python3.5/site-packages/django/db/models/lookups.py\", line 59, in get_prep_lookup\r\n    return self.lhs.output_field.get_prep_value(self.rhs)\r\n  File \"/Users/philip/Sites/tc_dev/venv/lib/python3.5/site-packages/django/db/models/fields/__init__.py\", line 1025, in get_prep_value\r\n    return self.to_python(value)\r\n  File \"/Users/philip/Sites/tc_dev/venv/lib/python3.5/site-packages/django/db/models/fields/__init__.py\", line 1018, in to_python\r\n    params={'value': value},\r\ndjango.core.exceptions.ValidationError: [\"'TRUE' value must be either True or False.\"]\r\n```\r\n\r\nFrom what I can tell some (1.10 change?) has meant the \"True\" values in the `errors/judges_invalid_line.csv` now longer (in)validate properly; throwing a ValidationError rather than the TournamentDataImporterError when trying to retrieve a boolean field. However as far as I can tell there isn't any explicit scrubbing of boolean values into valid True/False conditions anywhere, so I'm not sure where in the process this change would normally be accomodated.\r\n\r\nTo compensate I added the `ValidationError` exception and changed the expected exception counts in the test, is that the right way to go? "}}
{"actor":{"display_login":"philipbelesky"}}