Commit 38e2e92eb98380fcde4516c8fbd944544d4b9bae

Authored by Victor Costa
2 parents 0b16e860 6556aba3
Exists in staging and in 1 other branch production

Merge branch 'api-articles-period' into staging

Conflicts:
	lib/noosfero/api/helpers.rb
Showing 1 changed file with 2 additions and 2 deletions   Show diff stats
lib/noosfero/api/helpers.rb
... ... @@ -272,8 +272,8 @@ require_relative '../../find_by_contents'
272 272 until_param = "until_#{attribute}".to_sym
273 273 from_date = DateTime.parse(params.delete(from_param)) if params[from_param]
274 274 until_date = DateTime.parse(params.delete(until_param)) if params[until_param]
275   - scope = scope.where("#{attribute} >= ? or #{attribute} IS NULL", from_date) unless from_date.nil?
276   - scope = scope.where("#{attribute} <= ? or #{attribute} IS NULL", until_date) unless until_date.nil?
  275 + scope = scope.where("#{attribute} >= ?", from_date) unless from_date.nil?
  276 + scope = scope.where("#{attribute} <= ?", until_date) unless until_date.nil?
277 277 scope
278 278 end
279 279  
... ...