lib/osm/badge.rb in osm-0.6.1 vs lib/osm/badge.rb in osm-0.6.2
- old
+ new
@@ -383,9 +383,10 @@
return stages[index]
end
end
else
# 'Normal' staged badge
+ return 0 if completed == 5 || awarded == 5 # No more stages can be started
start_group = 'abcde'[completed] # Requirements use the group letter to denote stage
started = 'z'
requirements.each do |key, value|
next if key[0] < start_group # This stage is marked as completed
next if key[0] > started # This stage is after the stage currently started