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
master
Victor Seva 2 years ago
parent f5c5bf5ee3
commit 7545ef687f

@ -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

@ -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/

@ -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:

Loading…
Cancel
Save