mirror of
https://github.com/netbox-community/netbox.git
synced 2024-05-10 07:54:54 +00:00
Merge branch 'develop' into feature
This commit is contained in:
@@ -222,7 +222,7 @@ class JournalEntrySerializer(NetBoxModelSerializer):
|
||||
model = JournalEntry
|
||||
fields = [
|
||||
'id', 'url', 'display', 'assigned_object_type', 'assigned_object_id', 'assigned_object', 'created',
|
||||
'created_by', 'kind', 'comments', 'tags', 'custom_fields',
|
||||
'created_by', 'kind', 'comments', 'tags', 'custom_fields', 'last_updated',
|
||||
]
|
||||
|
||||
def validate(self, data):
|
||||
|
@@ -377,13 +377,8 @@ class CustomField(ExportTemplatesMixin, WebhooksMixin, ChangeLoggedModel):
|
||||
|
||||
# Text
|
||||
else:
|
||||
if self.type == CustomFieldTypeChoices.TYPE_LONGTEXT:
|
||||
max_length = None
|
||||
widget = forms.Textarea
|
||||
else:
|
||||
max_length = 255
|
||||
widget = None
|
||||
field = forms.CharField(max_length=max_length, required=required, initial=initial, widget=widget)
|
||||
widget = forms.Textarea if self.type == CustomFieldTypeChoices.TYPE_LONGTEXT else None
|
||||
field = forms.CharField(required=required, initial=initial, widget=widget)
|
||||
if self.validation_regex:
|
||||
field.validators = [
|
||||
RegexValidator(
|
||||
|
Reference in New Issue
Block a user