Make kind read-only for PUT/PATCH, use isinstance in Host Manager, update field fasly check

This commit is contained in:
Wayne Witzel III
2017-05-02 13:00:17 -04:00
parent bdb13ecd71
commit af35838aff
3 changed files with 15 additions and 5 deletions

View File

@@ -331,8 +331,10 @@ class ImplicitRoleField(models.ForeignKey):
class DynamicFilterField(models.TextField):
def get_prep_value(self, value):
if value is None:
return value
# Change any false value to none.
# https://docs.python.org/2/library/stdtypes.html#truth-value-testing
if not value:
return None
try:
DynamicFilter().query_from_string(value)
except RuntimeError, e: