lib/redmine-cli/resources.rb in redmine-cli-0.1.4 vs lib/redmine-cli/resources.rb in redmine-cli-0.1.5

- old
+ new

@@ -30,9 +30,12 @@ resources = [] while((fetched_resources = self.all(:params => params.merge({:limit => limit, :offset => offset}))).any?) resources += fetched_resources offset += limit + if fetched_resources.length < limit then + break + end end resources end end