Skip to content

Commit ebbc727

Browse files
authored
Fixes #299: add model to reserved CO field names (#321)
* #299 add model to reserved CO field names * #299 add extra reserved words to reserved CO field names * #299 add extra reserved words to reserved CO field names
1 parent c111f07 commit ebbc727

File tree

1 file changed

+20
-1
lines changed

1 file changed

+20
-1
lines changed

netbox_custom_objects/constants.py

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,18 +7,37 @@
77

88
APP_LABEL = "netbox_custom_objects"
99

10-
# Field names that are reserved and cannot be used for custom object fields
10+
# Field names that are reserved and cannot be used for custom object fields.
11+
# Keep in alphabetical order for ease of reading error message.
1112
RESERVED_FIELD_NAMES = [
13+
"_meta",
14+
"_state",
15+
"DoesNotExist",
16+
"MultipleObjectsReturned",
1217
"bookmarks",
18+
"clean",
19+
"clone",
1320
"contacts",
1421
"created",
1522
"custom_field_data",
23+
"custom_object_type",
24+
"custom_object_type_id",
25+
"delete",
26+
"full_clean",
27+
"get_absolute_url",
1628
"id",
1729
"images",
1830
"jobs",
1931
"journal_entries",
2032
"last_updated",
33+
"model",
34+
"objects",
2135
"pk",
36+
"refresh_from_db",
37+
"save",
38+
"serialize_object",
39+
"snapshot",
2240
"subscriptions",
2341
"tags",
42+
"to_objectchange",
2443
]

0 commit comments

Comments
 (0)