Permalink
Browse files

fix upcoming games admin w no quotes

  • Loading branch information...
1 parent 947b451 commit 62a6b308680ada452d2d406d0768ea9e93303d03 @geraldb geraldb committed Dec 11, 2012
Showing with 3 additions and 4 deletions.
  1. +3 −3 app/controllers/admin/games_controller.rb
  2. +0 −1 db/seeds/setups/uss/others_data.txt
@@ -14,7 +14,7 @@ def index
def batch_update
# mass update of games plus optional quotes
- games_hash = params[ :games ]
+ games_hash = params[ :games ] || []
games_hash.each do |game_key, game_hash|
game = Game.find( game_key )
@@ -33,7 +33,7 @@ def batch_update
end
end
- quotes_hash = params[ :quotes ]
+ quotes_hash = params[ :quotes ] || []
quotes_hash.each do |quote_key, quote_hash|
quote = Quote.find( quote_key )
@@ -54,7 +54,7 @@ def batch_update
end
end
- new_quotes_hash = params[ :new_quotes ]
+ new_quotes_hash = params[ :new_quotes ] || []
new_quotes_hash.each do |quote_key, quote_hash|
if( quote_hash[ :service_id ].present? &&
(quote_hash[ :odds1 ].present? || quote_hash[ :odds2 ].present? || quote_hash[ :odds3 ].present? ))
@@ -7,7 +7,6 @@
play-32,gerd,cl.2012/13+flex+ande,madrid,galatasaray,
-play-21,behroozs,at.cup.2012/13+flex+manfredk,austria,sturm,
play-14,franzr,at.cup.2012/13+flex+manfredk,rapid,salzburg,
play-5,franzr,world.quali.euro.2012/13+flex+behroozs,ger,swe,aut
play-8,ande,world.quali.euro.2012/13+flex+behroozs,ger,aut,swe

0 comments on commit 62a6b30

Please sign in to comment.