mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
PEP fixes
This commit is contained in:
parent
78309c1915
commit
32be39774f
@ -116,7 +116,7 @@ class InvenTreeAttachment(models.Model):
|
||||
})
|
||||
|
||||
super().save(*args, **kwargs)
|
||||
|
||||
|
||||
def __str__(self):
|
||||
if self.attachment is not None:
|
||||
return os.path.basename(self.attachment.name)
|
||||
|
@ -289,7 +289,6 @@ class InvenTreeAttachmentSerializer(InvenTreeModelSerializer):
|
||||
)
|
||||
|
||||
|
||||
|
||||
class InvenTreeImageSerializerField(serializers.ImageField):
|
||||
"""
|
||||
Custom image serializer.
|
||||
|
@ -16,7 +16,7 @@ from rest_framework import serializers
|
||||
from rest_framework.serializers import ValidationError
|
||||
|
||||
from InvenTree.serializers import InvenTreeModelSerializer, InvenTreeAttachmentSerializer
|
||||
from InvenTree.serializers import InvenTreeAttachmentSerializerField, UserSerializerBrief
|
||||
from InvenTree.serializers import UserSerializerBrief
|
||||
|
||||
import InvenTree.helpers
|
||||
from InvenTree.serializers import InvenTreeDecimalField
|
||||
|
@ -24,7 +24,6 @@ from InvenTree.serializers import InvenTreeAttachmentSerializer
|
||||
from InvenTree.serializers import InvenTreeModelSerializer
|
||||
from InvenTree.serializers import InvenTreeDecimalField
|
||||
from InvenTree.serializers import InvenTreeMoneySerializer
|
||||
from InvenTree.serializers import InvenTreeAttachmentSerializerField
|
||||
from InvenTree.status_codes import StockStatus
|
||||
|
||||
from part.serializers import PartBriefSerializer
|
||||
|
@ -149,7 +149,8 @@ function loadAttachmentTable(url, options) {
|
||||
|
||||
return renderLink(html, value);
|
||||
} else if (row.link) {
|
||||
return renderLink(row.link, row.link);
|
||||
var html = `<span class='fas fa-link'></span> ${row.link}`;
|
||||
return renderLink(html, row.link);
|
||||
} else {
|
||||
return '-';
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user