Skip to content

Instantly share code, notes, and snippets.

@matthewbelisle-wf
Created September 20, 2012 17:01
Show Gist options
  • Save matthewbelisle-wf/3757062 to your computer and use it in GitHub Desktop.
Save matthewbelisle-wf/3757062 to your computer and use it in GitHub Desktop.
def get_resource(resource_id=None):
for w in watchlist_list:
if (w.resource_id == resource_id and
w.user == get_current_user().resource_id):
return w
raise ResourceNotFound()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment