From fade70d7649cb1a1b73977714292e06ec9aa6878 Mon Sep 17 00:00:00 2001 From: Simon Charette Date: Fri, 5 Jun 2020 10:16:30 -0400 Subject: [PATCH] Remove Django < 2 support code. --- picklefield/fields.py | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/picklefield/fields.py b/picklefield/fields.py index 23fe7d9..cebfd61 100644 --- a/picklefield/fields.py +++ b/picklefield/fields.py @@ -3,7 +3,6 @@ from pickle import dumps, loads from zlib import compress, decompress -from django import VERSION as DJANGO_VERSION from django.core import checks from django.db import models from django.utils.encoding import force_str @@ -164,12 +163,8 @@ def pre_save(self, model_instance, add): value = super().pre_save(model_instance, add) return wrap_conflictual_object(value) - if DJANGO_VERSION < (2, 0): - def from_db_value(self, value, expression, connection, context): # pragma: no cover - return self.to_python(value) # pragma: no cover - else: - def from_db_value(self, value, expression, connection): # pragma: no cover - return self.to_python(value) # pragma: no cover + def from_db_value(self, value, expression, connection): + return self.to_python(value) def get_db_prep_value(self, value, connection=None, prepared=False): """