summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorÉtienne Loks <etienne.loks@iggdrasil.net>2019-09-24 10:42:46 +0200
committerÉtienne Loks <etienne.loks@iggdrasil.net>2019-09-24 10:42:46 +0200
commitbf40ecc3a19345ad56beca7082b695b789a252a7 (patch)
tree98bdbb382f8b29ea2d93b897e8db43191419b2ea
parentb953270cbfdb91973e6aa786214a62a2cb514c6e (diff)
downloadIshtar-bf40ecc3a19345ad56beca7082b695b789a252a7.tar.bz2
Ishtar-bf40ecc3a19345ad56beca7082b695b789a252a7.zip
Remove (for now) ContentType from serialization
-rw-r--r--archaeological_operations/models.py2
-rw-r--r--ishtar_common/serializers.py2
-rw-r--r--ishtar_common/tests.py3
3 files changed, 4 insertions, 3 deletions
diff --git a/archaeological_operations/models.py b/archaeological_operations/models.py
index d826d3c79..b547db375 100644
--- a/archaeological_operations/models.py
+++ b/archaeological_operations/models.py
@@ -108,7 +108,7 @@ class RecordQualityType(GeneralType):
class CulturalAttributionType(HierarchicalType):
- order = models.IntegerField(_("Order"))
+ order = models.IntegerField(_("Order"), default=10)
class Meta:
verbose_name = _("Cultural attribution type")
diff --git a/ishtar_common/serializers.py b/ishtar_common/serializers.py
index 29d6c76bf..84108c135 100644
--- a/ishtar_common/serializers.py
+++ b/ishtar_common/serializers.py
@@ -40,7 +40,7 @@ TYPE_MODEL_EXCLUDE = ["Area", "OperationTypeOld", "ProfileTypeSummary"]
def get_type_models():
- return [ContentType, Permission, Group] + [
+ return [Permission, Group] + [
model for model in apps.get_models()
if isinstance(model(), models.GeneralType) and (
model.__name__ not in TYPE_MODEL_EXCLUDE)
diff --git a/ishtar_common/tests.py b/ishtar_common/tests.py
index 4596f9b5e..9b7080387 100644
--- a/ishtar_common/tests.py
+++ b/ishtar_common/tests.py
@@ -714,10 +714,11 @@ class SerializationTest(GenericSerializationTest, TestCase):
from archaeological_finds.models import MaterialTypeQualityType, \
ObjectTypeQualityType, AlterationType, AlterationCauseType, \
TreatmentEmergencyType, CommunicabilityType
+ from archaeological_operations.models import CulturalAttributionType
for model in (models.LicenseType, MaterialTypeQualityType,
ObjectTypeQualityType, AlterationType,
AlterationCauseType, TreatmentEmergencyType,
- CommunicabilityType):
+ CommunicabilityType, CulturalAttributionType):
model.objects.create(txt_idx="test", label="Test")
def test_type_serialization(self):