Skip to content

Commit

Permalink
rubocop -A
Browse files Browse the repository at this point in the history
  • Loading branch information
sengi committed Feb 16, 2024
1 parent 5ba844e commit 03d1296
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion app/models/datafile.rb
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@ def compute_date(date_type)
return monthly_date(date_type) if dataset.monthly?
return quarterly_date(date_type) if dataset.quarterly?
return yearly_date(date_type) if dataset.annually?
return financial_yearly_date(date_type) if dataset.financial_yearly?

financial_yearly_date(date_type) if dataset.financial_yearly?
end

def daily_date
Expand Down
2 changes: 1 addition & 1 deletion app/workers/ckan/v26/ckan_org_sync_worker.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ def create_update_organisations(organisation_ids)

def delete_old_organisations(organisation_ids)
organisations = Organisation.where(name: organisation_ids)
Dataset.where(organisation: organisations).each(&:unpublish)
Dataset.where(organisation: organisations).find_each(&:unpublish)
organisations.destroy_all
end
end
Expand Down
2 changes: 1 addition & 1 deletion lib/tasks/update_organogram_filenames.rb
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def replace_urls
if @old_urls.empty?
"No urls to process"
else
Link.where("url LIKE 'https://s3-eu-west-1.amazonaws.com%'").each do |link|
Link.where("url LIKE 'https://s3-eu-west-1.amazonaws.com%'").find_each do |link|
next unless link.url.include? "-posts-"

index = @old_urls.index(link.url)
Expand Down

0 comments on commit 03d1296

Please sign in to comment.