FIX: Fix editing built-in badges after removing `_.include`

FIX: Fix editing built-in badges after removing _.include

We want to send the unprotected fields to the server. Corrects 4c8cfe0f

From f993aca3637dc407e0c287544196a0f3d8de9996 Mon Sep 17 00:00:00 2001
From: David Taylor <david@taylorhq.com>
Date: Tue, 27 Nov 2018 15:01:02 +0000
Subject: [PATCH] FIX: Fix editing built-in badges after removing `_.include`

We want to send the unprotected fields to the server. Corrects 4c8cfe0f

diff --git a/app/assets/javascripts/admin/controllers/admin-badges-show.js.es6 b/app/assets/javascripts/admin/controllers/admin-badges-show.js.es6
index cdb5337..351d8e4 100644
--- a/app/assets/javascripts/admin/controllers/admin-badges-show.js.es6
+++ b/app/assets/javascripts/admin/controllers/admin-badges-show.js.es6
@@ -55,7 +55,7 @@ export default Ember.Controller.extend(BufferedContent, {
 
         if (this.get("buffered.system")) {
           var protectedFields = this.get("protectedSystemFields") || [];
-          fields = _.filter(fields, f => protectedFields.includes(f));
+          fields = _.filter(fields, f => !protectedFields.includes(f));
         }
 
         this.set("saving", true);

GitHub

1 Like