Commits

g9jasonc  committed 1eaaef6

Byte removing fix for modeltests.serializers

  • Participants
  • Parent commits 49e1828

Comments (0)

Files changed (2)

File django/core/serializers/python.py

 
     def end_object(self, obj):
         self.objects.append({
-            "model"  : smart_unicode(obj._meta),
+            "model"  : smart_unicode(obj._meta).replace("b'", "").replace("'", ""),
             "pk"     : smart_unicode(obj._get_pk_val(), strings_only=True),
             "fields" : self._current
         })

File django/core/serializers/xml_serializer.py

                 "<%s> node is missing the required '%s' attribute" \
                     % (node.nodeName, attr))
         try:
-            Model = models.get_model(*model_identifier.split("."))
+            Model = models.get_model(*model_identifier.replace("b'", "").replace("'", "").split("."))
         except TypeError:
             Model = None
         if Model is None: