mirror of
https://github.com/netbox-community/netbox.git
synced 2025-12-19 03:42:25 -06:00
Merge branch 'develop' into feature
This commit is contained in:
@@ -123,9 +123,9 @@ class BulkImportForm(BootstrapMixin, SyncedDataMixin, forms.Form):
|
||||
records = []
|
||||
try:
|
||||
for data in yaml.load_all(data, Loader=yaml.SafeLoader):
|
||||
if type(data) == list:
|
||||
if type(data) is list:
|
||||
records.extend(data)
|
||||
elif type(data) == dict:
|
||||
elif type(data) is dict:
|
||||
records.append(data)
|
||||
else:
|
||||
raise forms.ValidationError({
|
||||
|
||||
@@ -114,7 +114,7 @@ def annotated_date(date_value):
|
||||
if not date_value:
|
||||
return ''
|
||||
|
||||
if type(date_value) == datetime.date:
|
||||
if type(date_value) is datetime.date:
|
||||
long_ts = date(date_value, 'DATE_FORMAT')
|
||||
short_ts = date(date_value, 'SHORT_DATE_FORMAT')
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user