From 7545ef687f201370c52cbaa10873e40a83e8f3b0 Mon Sep 17 00:00:00 2001 From: Victor Seva Date: Wed, 15 Mar 2023 16:46:38 +0100 Subject: [PATCH] MT#56834 tracker: changes needed for >= 3.0 https: //django-import-export.readthedocs.io/en/latest/api_resources.html?highlight=skip_row#import_export.resources.Resource.skip_row Change-Id: I5270f168ddc78062feaff7fa5dfb704223bf6b6a --- requirements/common.txt | 2 +- t/Dockerfile | 6 +++--- tracker/admin.py | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/requirements/common.txt b/requirements/common.txt index 033fad4..dd88bcf 100644 --- a/requirements/common.txt +++ b/requirements/common.txt @@ -8,7 +8,7 @@ django-celery-results django-crispy-forms==2.* django-extensions django-filter -django-import-export<3.0 +django-import-export>=3.0 django-jsonify django-structlog django-timezone-field diff --git a/t/Dockerfile b/t/Dockerfile index dd3c655..96a0f78 100644 --- a/t/Dockerfile +++ b/t/Dockerfile @@ -5,12 +5,13 @@ FROM docker.mgm.sipwise.com/sipwise-bullseye:latest # is updated with the current date. It will force refresh of all # of the base images and things like `apt-get update` won't be using # old cached versions when the Dockerfile is built. -ENV REFRESHED_AT 2023-03-04 +ENV REFRESHED_AT 2023-03-15 RUN apt-get update && apt-get install --assume-yes python3 python3-dev \ python3-pytest python3-pytest-pep8 \ python3-pytest-pylint python3-pytest-cov python3-junitxml \ - python3-pip python3-virtualenv virtualenv sqlite3 git tmux + python3-pip python3-virtualenv virtualenv sqlite3 git tmux \ + && apt-get clean # Get pip to download and install requirements: ADD requirements/*.txt /tmp/ @@ -18,7 +19,6 @@ RUN pip3 install -r /tmp/test.txt RUN echo './t/testrunner' >>/root/.bash_history ADD .tmux.conf /root/.tmux.conf -RUN apt-get clean WORKDIR /code/ diff --git a/tracker/admin.py b/tracker/admin.py index 1a40f46..11cf6d7 100644 --- a/tracker/admin.py +++ b/tracker/admin.py @@ -27,7 +27,7 @@ class TrackerMapperResource(resources.ModelResource): use_bulk = True skip_unchanged = True - def skip_row(self, instance, original): + def skip_row(self, instance, original, row, import_validation_errors=None): try: mantis_id = int(original.mantis_id) except ValueError: