fix uid
This commit is contained in:
parent
3d65aaffbc
commit
2a60bfe730
|
|
@ -47,13 +47,14 @@ class CurationPostSection
|
|||
end
|
||||
|
||||
def get_frontend_object
|
||||
case self.section_type
|
||||
uid = self.id.to_s[0,5] + self.id.to_s[-5,5]
|
||||
case self.section_type
|
||||
when "universal_table"
|
||||
{
|
||||
"section" => self.title,
|
||||
"section_uid" => self.id.to_s[0..5],
|
||||
"section_uid" => uid,
|
||||
"entries" => self.get_table_entries_for_frontend,
|
||||
"url_to_show" => "",
|
||||
"type" => self.section_type,
|
||||
"text" => "",
|
||||
"mind_map_title" => "",
|
||||
"mind_map_data" => ""
|
||||
|
|
@ -61,11 +62,9 @@ class CurationPostSection
|
|||
when "text"
|
||||
{
|
||||
"section" => self.title,
|
||||
"section_uid" => self.id.to_s[0..5],
|
||||
"section_uid" => uid,
|
||||
"entries" => [],
|
||||
"uid" => "",
|
||||
"type" => self.section_type,
|
||||
"url_to_show" => "",
|
||||
"text" => self.text.html_safe,
|
||||
"mind_map_title" => "",
|
||||
"mind_map_data" => ""
|
||||
|
|
@ -74,14 +73,12 @@ class CurationPostSection
|
|||
mm = MindMap.find(self.mind_map_id)
|
||||
{
|
||||
"section" => self.title,
|
||||
"section_uid" => self.id.to_s[0..5],
|
||||
"section_uid" => uid,
|
||||
"entries" => [],
|
||||
"mind_map_title" => mm.title,
|
||||
"mind_map_data" => mm.mind_map_data.to_json,
|
||||
"uid" => "",
|
||||
"type" => self.section_type,
|
||||
"url_to_show" => "",
|
||||
"text" => ""
|
||||
"text" => "",
|
||||
"mind_map_title" => mm.title,
|
||||
"mind_map_data" => mm.mind_map_data.to_json
|
||||
}
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Reference in New Issue