Fix cabinet and tags upload wizard steps

Steps were missing some entries. Closes GitLab issue #632.
Thanks to Matthias Urhahn (@d4rken) for the report.

Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
This commit is contained in:
Roberto Rosario
2019-07-05 00:28:01 -04:00
parent b8345797d6
commit 2af03eeca8
12 changed files with 174 additions and 94 deletions
+36
View File
@@ -0,0 +1,36 @@
from __future__ import unicode_literals
from django.http import QueryDict
from django.utils.encoding import force_bytes
class URL(object):
def __init__(self, path=None, query_string=None):
self._path = path
self._query_string = query_string
kwargs = {'mutable': True}
if query_string:
kwargs['query_string'] = query_string.encode('utf-8')
self._args = QueryDict(**kwargs)
@property
def args(self):
return self._args
def to_string(self):
if self._args.keys():
query = force_bytes(
'?{}'.format(self._args.urlencode())
)
else:
query = ''
if self._path:
path = self._path
else:
path = ''
result = force_bytes('{}{}'.format(path, query))
return result