Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Joe Wesch <10467633+joewesch@users.noreply.github.com>
  • Loading branch information
itdependsnetworks and joewesch authored Jul 24, 2023
1 parent 117afb2 commit 9f753c0
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions nautobot_golden_config/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -466,7 +466,7 @@ class Meta:
class ConfigPlanForm(NautobotModelForm):
"""Form for ConfigPlan instances."""

plan_type = forms.ChoiceField(choices=add_blank_choice(ConfigPlanTypeChoice), required=False, label="Plan Type")
plan_type = forms.ChoiceField(choices=add_blank_choice(ConfigPlanTypeChoice), required=True, label="Plan Type")
change_control_id = forms.CharField(required=False, label="Change Control ID")
change_control_url = forms.URLField(required=False, label="Change Control URL")

Expand All @@ -489,7 +489,7 @@ class ConfigPlanForm(NautobotModelForm):

tenant_group = utilities_forms.DynamicModelMultipleChoiceField(queryset=TenantGroup.objects.all(), required=False)
tenant = utilities_forms.DynamicModelMultipleChoiceField(queryset=Tenant.objects.all(), required=False)
location = utilities_forms.DynamicModelMultipleChoiceField(queryset=Location.objects.all(), required=False)
# location = utilities_forms.DynamicModelMultipleChoiceField(queryset=Location.objects.all(), required=False)
region = utilities_forms.DynamicModelMultipleChoiceField(queryset=Region.objects.all(), required=False)
site = utilities_forms.DynamicModelMultipleChoiceField(queryset=Site.objects.all(), required=False)
rack_group = utilities_forms.DynamicModelMultipleChoiceField(queryset=RackGroup.objects.all(), required=False)
Expand Down
2 changes: 1 addition & 1 deletion nautobot_golden_config/jobs.py
Original file line number Diff line number Diff line change
Expand Up @@ -379,7 +379,7 @@ def _generate_config_plan_from_feature(self):
job_result=self.job_result,
)
config_plan.feature.set(features)
config_plan.save()
config_plan.validated_save()
_features = ", ".join([str(feat) for feat in features])
self.log_success(obj=config_plan, message=f"Config plan created for `{device}` with feature `{_features}`.")

Expand Down
2 changes: 1 addition & 1 deletion nautobot_golden_config/static/run_job.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ function pollJobStatus(jobId) {
if (["errored", "failed"].includes(data.status.value)) {
$('#errorDetails').show();
$('#errorDetails').addClass("alert alert-danger text-center");
$('#errorDetails').append("Job Started but failed during the Job run, this job may have partially completed, see Job Results for more details on the errors.");
$('#errorDetails').append("Job Started but failed during the Job run. This job may have partially completed. See Job Results for more details on the errors.");
} else if (data.status.value === "running") {
// Job is still processing, continue polling
setTimeout(function() {
Expand Down

0 comments on commit 9f753c0

Please sign in to comment.