Remove more unnecesary lowercase on attachments
parent
eeaac88463
commit
12b93b78a1
|
@ -276,7 +276,7 @@ def store_attachment(project, obj, attachment):
|
|||
serialized.object.owner = serialized.object.project.owner
|
||||
serialized.object._importing = True
|
||||
serialized.object.size = serialized.object.attached_file.size
|
||||
serialized.object.name = path.basename(serialized.object.attached_file.name).lower()
|
||||
serialized.object.name = path.basename(serialized.object.attached_file.name)
|
||||
serialized.save()
|
||||
return serialized
|
||||
add_errors("attachments", serialized.errors)
|
||||
|
|
|
@ -56,7 +56,7 @@ class BaseAttachmentViewSet(HistoryResourceMixin, WatchedResourceMixin, ModelCru
|
|||
obj.content_type = self.get_content_type()
|
||||
obj.owner = self.request.user
|
||||
obj.size = obj.attached_file.size
|
||||
obj.name = path.basename(obj.attached_file.name).lower()
|
||||
obj.name = path.basename(obj.attached_file.name)
|
||||
|
||||
if obj.project_id != obj.content_object.project_id:
|
||||
raise exc.WrongArguments(_("Project ID not matches between object and project"))
|
||||
|
|
|
@ -221,7 +221,7 @@ class Command(BaseCommand):
|
|||
membership = self.sd.db_object_from_queryset(obj.project.memberships
|
||||
.filter(user__isnull=False))
|
||||
attachment = Attachment.objects.create(project=obj.project,
|
||||
name=path.basename(attached_file.name).lower(),
|
||||
name=path.basename(attached_file.name),
|
||||
size=attached_file.size,
|
||||
content_object=obj,
|
||||
order=order,
|
||||
|
|
Loading…
Reference in New Issue