File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -94,29 +94,27 @@ defmodule Philomena.Tags do
9494 |> Enum . sort ( )
9595 |> Enum . dedup ( )
9696 |> Enum . map (
97- & ( % Tag {
98- created_at: { :placeholder , :timestamp } ,
99- updated_at: { :placeholder , :timestamp }
100- }
97+ & ( % Tag { }
10198 |> Tag . creation_changeset ( % { name: & 1 } )
10299 |> Ecto.Changeset . apply_changes ( )
103- |> Map . from_struct ( )
104- |> Map . drop ( [
105- :id ,
106- :__meta__ ,
107- :aliases ,
108- :aliased_tag ,
109- :channels ,
110- :implied_tags ,
111- :implied_by_tags ,
112- :verified_links ,
113- :public_links ,
114- :hidden_links ,
115- :dnp_entries ,
116- :uploaded_image ,
117- :removed_image ,
118- :implied_tag_list
119- ] ) )
100+ |> Map . take ( [
101+ :slug ,
102+ :name ,
103+ :category ,
104+ :images_count ,
105+ :description ,
106+ :short_description ,
107+ :namespace ,
108+ :name_in_namespace ,
109+ :image ,
110+ :image_format ,
111+ :image_mime_type ,
112+ :mod_notes
113+ ] )
114+ |> Map . merge ( % {
115+ created_at: { :placeholder , :timestamp } ,
116+ updated_at: { :placeholder , :timestamp }
117+ } ) )
120118 )
121119
122120 % { new_tags: { _rows_affected , new_tags } , all_tags: all_tags } =
You can’t perform that action at this time.
0 commit comments