comses / catalog

Web tools to annotate publications related to computational modeling
http://catalog.comses.net
GNU General Public License v3.0
3 stars 3 forks source link

django 1.10 upgrade #68

Closed alee closed 8 years ago

alee commented 8 years ago

Fix all backwards incompatible changes:

https://docs.djangoproject.com/en/1.10/releases/1.10/#backwards-incompatible-1-10

alee commented 8 years ago

tests failing due to

ERROR: test_split_platform_same_new_name (catalog.citation.tests.test_data_clean.SplitTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/code/catalog/citation/tests/test_data_clean.py", line 39, in test_split_platform_same_new_name
    processor = dedupe.DataProcessor(models.Platform, creator=self.user)
  File "/code/catalog/citation/dedupe.py", line 14, in __init__
    self.through_model = model.publications.field.related.through
AttributeError: 'ManyToManyField' object has no attribute 'related'
ERROR: test_ingest (catalog.citation.tests.test_pipeline.TestPipeline)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/code/catalog/citation/tests/test_pipeline.py", line 13, in test_ingest
    cmd.handle(filename="catalog/citation/tests/load_bibtex.json", username='foo')
  File "/code/catalog/citation/management/commands/load_bibtex.py", line 33, in handle
    bibtex_api.process_entries(settings, user)
  File "/code/catalog/citation/bibtex/common.py", line 40, in process_entries
    publication = entry_api.process(entry, audit_command)
  File "/code/catalog/citation/bibtex/entry/api.py", line 94, in process
    make_references(publication, entry, raw, audit_command)
  File "/code/catalog/citation/bibtex/entry/api.py", line 62, in make_references
    return ref.process_many(publication, refs_str, raw, audit_command)
  File "/code/catalog/citation/bibtex/ref/api.py", line 127, in process_many
    return [process(publication, ref, raw, audit_command) for ref in refs]
  File "/code/catalog/citation/bibtex/ref/api.py", line 127, in <listcomp>
    return [process(publication, ref, raw, audit_command) for ref in refs]
  File "/code/catalog/citation/bibtex/ref/api.py", line 112, in process
    make_author(citation, citation_raw, author_str, audit_command)
  File "/code/catalog/citation/bibtex/ref/api.py", line 33, in make_author
    name=cleaned_author_str)
  File "/code/catalog/citation/models.py", line 90, in log_create
    instance = self.create(**kwargs)
  File "/usr/local/lib/python3.5/site-packages/django/db/models/manager.py", line 85, in manager_method
    return getattr(self.get_queryset(), name)(*args, **kwargs)
  File "/usr/local/lib/python3.5/site-packages/django/db/models/query.py", line 397, in create
    obj = self.model(**kwargs)
  File "/usr/local/lib/python3.5/site-packages/django/db/models/base.py", line 555, in __init__
    raise TypeError("'%s' is an invalid keyword argument for this function" % list(kwargs)[0])
TypeError: 'name' is an invalid keyword argument for this function
alee commented 8 years ago

Fixed in e54c771d5cf0ec4d9dafb2e73ec7432d3ed6f533 and d053cff9baac956f27da0968ea6613058ddfd129