Don't allow script arg variable assignment to callable attributes. Fixes
@@ -299,7 +299,8 @@ def replace_db_values(
if not obj:
return ""
- if hasattr(obj, temp[1]):
+ # check if attr exists and isn't a function
+ if hasattr(obj, temp[1]) and not callable(getattr(obj, temp[1])):
value = f"'{getattr(obj, temp[1])}'" if quotes else getattr(obj, temp[1])
elif CustomField.objects.filter(model=model, name=temp[1]).exists():
