FIX: Ensure custom fields are saved for new alert topics

FIX: Ensure custom fields are saved for new alert topics

Also add a safeguard so topics are never updated with blank titles

diff --git a/app/jobs/concerns/alert_post_mixin.rb b/app/jobs/concerns/alert_post_mixin.rb
index 0eb12ce..0c3347f 100644
--- a/app/jobs/concerns/alert_post_mixin.rb
+++ b/app/jobs/concerns/alert_post_mixin.rb
@@ -61,6 +61,7 @@ module AlertPostMixin
   end
 
   def generate_title(base_title, firing_count)
+    base_title = base_title.presence || I18n.t('prom_alert_receiver.topic_title.untitled')
     if firing_count > 0
       I18n.t("prom_alert_receiver.topic_title.firing", base_title: base_title, count: firing_count)
     else
diff --git a/app/jobs/regular/process_alert.rb b/app/jobs/regular/process_alert.rb
index d64a009..ce32b2f 100644
--- a/app/jobs/regular/process_alert.rb
+++ b/app/jobs/regular/process_alert.rb
@@ -100,6 +100,8 @@ module Jobs
           t.custom_fields[PREVIOUS_TOPIC] = prev_topic_id
         end
 
+        t.save_custom_fields
+
         receiver[:topic_map][group_key(params)] = t.id
 
         PluginStore.set(::DiscoursePrometheusAlertReceiver::PLUGIN_NAME,
diff --git a/config/locales/server.en.yml b/config/locales/server.en.yml
index 7c56d39..97165f2 100644
--- a/config/locales/server.en.yml
+++ b/config/locales/server.en.yml
@@ -8,4 +8,5 @@ en:
     topic_title: 
       not_firing: "%{base_title}"
       firing: "%{base_title} (%{count} firing)"
+      untitled: Untitled alert topic
       

GitHub sha: fdccea77