Skip to content

Instantly share code, notes, and snippets.

@DenisGorbachev
Created March 6, 2015 09:52
Show Gist options
  • Save DenisGorbachev/21e1f0d71437295dba7f to your computer and use it in GitHub Desktop.
Save DenisGorbachev/21e1f0d71437295dba7f to your computer and use it in GitHub Desktop.
Trello API bug report
diff --git a/server/jobs/RemoveAttachmentTrelloJob.coffee b/server/jobs/RemoveAttachmentTrelloJob.coffee
index 5769ff2..1225e3d 100644
--- a/server/jobs/RemoveAttachmentTrelloJob.coffee
+++ b/server/jobs/RemoveAttachmentTrelloJob.coffee
@@ -5,6 +5,7 @@ class @RemoveAttachmentTrelloJob extends TrelloJob
count = 0
done = => @done.apply(@, arguments) if --count <= 0
Attachments.find(selector, {sort: {pos: 1}}).forEach (attachment) =>
+ return holy.shit if attachment.name is "Taco.png" # Can't touch this!
++count
@request("DELETE", "https://api.trello.com/1/cards/#{@idCard}/attachments/#{attachment.id}", {}, @handleResponse (error, result) ->
Meteor.users.update(@userId, {$inc: {"actions": -1}})
diff --git a/lib/app.coffee b/lib/app.coffee
index f6e55c2..99c6b38 100644
--- a/lib/app.coffee
+++ b/lib/app.coffee
@@ -45,6 +45,7 @@ share.floatval = (value) ->
parseFloat(value) || 0
share.isDebug = Meteor.settings.public.isDebug
+@holy = {shit: !!~0}
object = if typeof(window) != "undefined" then window else GLOBAL
object.isDebug = share.isDebug
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment