question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Ignore old custom field data

See original GitHub issue

Environment

  • Python version: 3.6.8
  • Nautobot version: 1.0.1

We used to have a custom field asw_vulnerabilityscan assigned to IP Addresses. It is no longer assigned to this model, but still exists and is assigned to other models. But our DB contains this field for 1036 of such IPs. Editing any of these is not possible as it crashes on the field being set. image

AFAICT is it great to keep this data as long as the field exists since it is very easy to missclick and remove the field from some model by accident. But form validation should ignore these.

Steps to Reproduce

  1. Create custom field
  2. Assign it to some object
  3. Create instance of such object
  4. Fill in the custom field
  5. Unassign the custom field from the object
  6. Try to edit the created instance

Expected Behavior

No issues found.

Observed Behavior

Unable to edit, old custom field data breaks for validation.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
lampwinscommented, Jun 4, 2021

So there are realistically two bugs here.

  1. The custom field background tasks are not being run in an atomic transaction. This is an oversight on my part.
  2. The job times out on larger data sets. This one will be easier to sort out in 1.1 with #223 which is already underway.

Additionally, we should probably create a command to normalize custom field data in the event one of these jobs fails. Muck like the trace paths command.

0reactions
jathanismcommented, Jun 4, 2021

Okay thanks. Need to try to reproduce this and I’ll follow up!

Read more comments on GitHub >

github_iconTop Results From Across the Web

SOQL - ignore custom field if non existent in object
In Case you don't want to check explicitly all the fields, You can follow below approach to iterate through all the fields to...
Read more >
How do I disable a custom field on JIRA Cloud?
Solved: Hi there, We have a custom field on our project that we're not gonna use anymore, but we want to keep its...
Read more >
How do I remove old "InActive" Custom Fields? - Help
How do I remove old "InActive" Custom Fields? First issue, the 3 custom field limitation is causing an issue where the API only...
Read more >
Remove old custom field name - ACF Support
Is there a way to remove the custom field names that are already store in my database? I created a list of fields...
Read more >
How To Delete Custom Fields From Wordpress Without ...
Here's a quick and easy way to delete old custom field data from your Wordpress database... without having to go into PHPMyAdmin.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found