nautobot / nautobot-app-firewall-models

Model Firewall policies in Nautobot
https://docs.nautobot.com/projects/firewall-models/en/latest/
Other
32 stars 12 forks source link

Views for updating m2m weights are directly modifying database fields without a form #273

Open gsnider2195 opened 2 days ago

gsnider2195 commented 2 days ago

Environment

Expected Behavior

When populating invalid values into these "forms" I expect to see standard django form failures

Observed Behavior

Form failures present as 500 errors since these views don't use forms to populate the data.

{4C8ECB97-0CE4-4FB6-98EF-31063CBE7C62}

Steps to Reproduce

  1. Create a Policy (or NATPolicy) with an assigned device
  2. Click on the detail view for the policy
  3. Click on the "Edit Policy Weight on Assigned Device" tab
  4. Enter a value higher than the database's max allowed value of 32767 for the weight field