From 803f4d00152a455f8c3b82dc2363b9a2d4bd5d68 Mon Sep 17 00:00:00 2001 From: Adam Hooper Date: Fri, 3 May 2019 17:00:37 -0400 Subject: [PATCH] Upgrade django-polymorphic I'm not in the habit of testing the admin interface, so I don't know what things _were_ like. But after this change, it's impossible to delete a workflow from the admin interface. Probably related to https://github.com/django-polymorphic/django-polymorphic/issues/229 which was never fixed; our workaround for it stopped working (and I'm keen to delete that workaround anyway, because we veered way into jank-ville here). --- Pipfile | 2 +- Pipfile.lock | 8 ++++---- server/models/Delta.py | 5 ----- 3 files changed, 5 insertions(+), 10 deletions(-) diff --git a/Pipfile b/Pipfile index f8a67169a..908881f33 100644 --- a/Pipfile +++ b/Pipfile @@ -9,7 +9,7 @@ aiohttp = "==3.5.4" channels = "==2.2.0" Django = "==1.11.20" "django-allauth" = "==0.37.0" -"django-polymorphic" = "==1.3" +django-polymorphic = "~=2.0.3" djangorestframework = "~=3.9.3" "django-user-accounts" = "==2.1.0" "django-webpack-loader" = "==0.6.0" diff --git a/Pipfile.lock b/Pipfile.lock index e74a0a713..aa4db1941 100644 --- a/Pipfile.lock +++ b/Pipfile.lock @@ -1,7 +1,7 @@ { "_meta": { "hash": { - "sha256": "f6ce9125a295b7ba257b3ee47e1920c140f26c6e7e68ba9293430f0843153262" + "sha256": "3f116ffef657f89343f55561106daba6052d6a58d0001ddef3848922cb93d4c4" }, "pipfile-spec": 6, "requires": { @@ -298,11 +298,11 @@ }, "django-polymorphic": { "hashes": [ - "sha256:8737b465ebf5fad772b4c52272189c352f5904f468d298584a3469187e3207ad", - "sha256:8f4e36ada0ec16b98de0b6e53477772fcac3ece89a1da8473ee6aa4e658775a7" + "sha256:1fb5505537bcaf71cfc951ff94c4e3ba83c761eaca04b7b2ce9cb63937634ea5", + "sha256:79e7df455fdc8c3d28d38b7ab8323fc21d109a162b8ca282119e0e9ce8db7bdb" ], "index": "pypi", - "version": "==1.3" + "version": "==2.0.3" }, "django-user-accounts": { "hashes": [ diff --git a/server/models/Delta.py b/server/models/Delta.py index 609e8488b..24091a477 100644 --- a/server/models/Delta.py +++ b/server/models/Delta.py @@ -29,11 +29,6 @@ def _prepare_json(data: Any) -> Any: # When creating a Delta, the two commands will be called in the same atomic # transaction. class Delta(PolymorphicModel): - class Meta: - # OMG this bug ate so many hours... - # https://github.com/django-polymorphic/django-polymorphic/issues/229 - base_manager_name = 'base_objects' - # These fields must be set by any child classes, when instantiating workflow = models.ForeignKey('Workflow', related_name='deltas', on_delete=models.CASCADE)