[Backport] Enhancement#4356: Add gzipped dumps import support

remotes/origin/issue/4795/notification_even_they_are_disabled
Jesús Espino 2016-06-21 13:44:00 +02:00 committed by Alejandro Alonso
parent 63a3b573af
commit b6839a9505
2 changed files with 3 additions and 1 deletions

View File

@ -1,6 +1,5 @@
# Changelog # # Changelog #
## 2.1.0 Ursus Americanus (2016-05-03) ## 2.1.0 Ursus Americanus (2016-05-03)
### Features ### Features

View File

@ -318,6 +318,9 @@ class ProjectImporterViewSet(mixins.ImportThrottlingPolicyMixin, CreateModelMixi
if not dump: if not dump:
raise exc.WrongArguments(_("Needed dump file")) raise exc.WrongArguments(_("Needed dump file"))
if dump.content_type == "application/gzip":
dump = gzip.GzipFile(fileobj=dump)
reader = codecs.getreader("utf-8") reader = codecs.getreader("utf-8")
try: try: