Project

General

Profile

Bug #1478

KV Store lookup fields are not loaded for some reason in some cases

Added by Luke Murphey over 7 years ago. Updated over 7 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Target version:
Start date:
09/12/2016
Due date:
% Done:

100%


Description

To repro:
  1. Install Slideshow
  2. Make a saved show
  3. Load the 'saved_slideshows' collection, note that the configuration column is empty

History

#1 Updated by Luke Murphey over 7 years ago

This is little complicated.

I have to flatten the dictionary such since the KV schema supports hierarchy. The problem is when a field contains JSON but the JSON is to be stored within the field, not flattened.

Here is some raw input:

[(u'name', u'Test'), (u'configuration.views', [{u'name': u'access_anomalies', u'app': u'DA-ESS-AccessProtection'}, {u'name': u'account_management', u'app': u'DA-ESS-AccessProtection'}, {u'name': u'incident_review', u'app': u'SA-ThreatIntelligence'}]), (u'configuration.hide_chrome', True), (u'configuration.delay', 300), (u'configuration.invert_colors', True), (u'configuration.delay_readable', u'5m'), (u'_user', u'nobody'), (u'_key', u'123456789')]

This parses to:

{
   "name":"Test",
   "configuration":{
      "views":[
         {
            "name":"access_anomalies",
            "app":"DA-ESS-AccessProtection" 
         },
         {
            "name":"account_management",
            "app":"DA-ESS-AccessProtection" 
         },
         {
            "name":"incident_review",
            "app":"SA-ThreatIntelligence" 
         }
      ],
      "delay":300,
      "delay_readable":"5m",
      "hide_chrome":true,
      "invert_colors":true
   },
   "_user":"nobody",
   "_key":"123456789" 
}

However, some of these should be left as raw content.

#2 Updated by Luke Murphey over 7 years ago

I have this loading, but it won't save.

#3 Updated by Luke Murphey over 7 years ago

This seems to be working now.

#4 Updated by Luke Murphey over 7 years ago

  • Status changed from New to Closed
  • % Done changed from 0 to 100

Also available in: Atom PDF