Skip to content
This repository has been archived by the owner on Apr 4, 2023. It is now read-only.

Commit

Permalink
Convert Django bytes-wrapper into bytes.
Browse files Browse the repository at this point in the history
For Python 2 compatibility.
  • Loading branch information
cmc333333 committed Feb 27, 2017
1 parent 86c21e5 commit 773e642
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion regparser/web/index/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ class SourceFile(Serialized):
file_name = models.CharField(max_length=128)

def xml(self):
return etree.fromstring(self.contents)
return etree.fromstring(bytes(self.contents))

class Meta:
unique_together = ('collection', 'file_name')
Expand Down

0 comments on commit 773e642

Please sign in to comment.