Skip to content
This repository has been archived by the owner on Feb 22, 2024. It is now read-only.

get_api method hard coded to current_user #67

Open
stephanelsmith opened this issue Feb 17, 2015 · 0 comments
Open

get_api method hard coded to current_user #67

stephanelsmith opened this issue Feb 17, 2015 · 0 comments

Comments

@stephanelsmith
Copy link

in core.py
47 def get_connection(self):
48 return _social.datastore.find_connection(provider_id=self.id,
49 user_id=current_user.id) <<<------ HERE
50
51 def get_api(self):
52 module = import_module(self.module)
53 connection = self.get_connection() <<--- Get_connection assumes current_user.
54 if connection is None:
55 return None
56 return module.get_api(connection=connection,
57 consumer_key=self.consumer_key,
58 consumer_secret=self.consumer_secret)

User id is hard coded to the current_user. Requesting parameters to pass user. This may be required when social activities are done in a different context than a normal request.

Have a commit coming shortly.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

No branches or pull requests

1 participant