Skip to content

Commit

Permalink
Merge pull request #2838 from CartoDB/1357-clear-sync-errors-after-su…
Browse files Browse the repository at this point in the history
…ccess

1357 clear sync errors after success
  • Loading branch information
Rafa de la Torre committed Mar 20, 2015
2 parents 16d100d + 2703bd2 commit 8bf0ddf
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions app/models/synchronization/member.rb
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@ def should_auto_sync?
def run
importer = nil
self.state = STATE_SYNCING
self.store

# First import is a "normal import" so still has no id, then run gets called and will get log first time
# but we need this to fix old logs
Expand Down
2 changes: 1 addition & 1 deletion services/datasources/lib/datasources/url/gdrive.rb
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ def get_resource(id)
result = @client.execute(uri: item_data.fetch(:url))

if result.status != 200
if result.data['error'].nil? || result.data['error']['message'].nil?
if result.data.nil? || result.data['error'].nil? || result.data['error']['message'].nil?
error_message = 'Unknown error'
else
error_message = result.data['error']['message']
Expand Down

0 comments on commit 8bf0ddf

Please sign in to comment.