forked from saurabh/orbit4-5
				
			a small fix for no chinese translations
This commit is contained in:
		
							parent
							
								
									f3dd0b8295
								
							
						
					
					
						commit
						f2de4eb0e3
					
				|  | @ -625,7 +625,7 @@ class Admin::ImportController < OrbitAdminController | ||||||
|         cat = Category.where(:title => category[1]["zh_tw"], :module_app_id => module_app.id).first |         cat = Category.where(:title => category[1]["zh_tw"], :module_app_id => module_app.id).first | ||||||
|         if cat.nil? |         if cat.nil? | ||||||
|           cat = Category.new |           cat = Category.new | ||||||
|           cat.title_translations = {"en" => category[1]["en"], "zh_tw" => category[1]["zh_tw"]} |           cat.title_translations = {"en" => (category[1]["en"] || category[1]["zh_tw"]), "zh_tw" => (category[1]["zh_tw"] || category[1]["en"])} | ||||||
|           cat.save |           cat.save | ||||||
|           module_app.categories << cat |           module_app.categories << cat | ||||||
|         end |         end | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue