How To clear cached entries from open field parameters


Here is some starter code to be able to clear out volume label parameter cached entries.

Use Case: These cached entries are collecting garbage information realtime, even before hitting the submit button, and then later those cached entries are overriding actual entries being submitted, adding things like spaces. End result is invalid entries getting through to our disk format action and failing builds

Consideration: The way listed below to delete those will be to delete those CustomFieldValues, so if any of those are in use they will be removed from the servers/resources they are on as well.


(in shell_plus):

for cfv in CustomFieldValue.objects.filter(field=00): #replace 00 with the ID of the parameter

You can also expand on this further and do a check if the cfv is on any active Servers to skip those and only delete cfvs not in use.

Have more questions? Submit a request


Please sign in to leave a comment.