Conversation
iambibhas
commented
Jun 26, 2018
hasjob/views/helper.py
Outdated
|
|
||
| # Prepare event session if it's not already present | ||
| if current_auth or g.anon_user and not g.esession: | ||
| if current_auth and not g.esession: |
There was a problem hiding this comment.
because current_auth checks for g.user or g.anon_user.
There was a problem hiding this comment.
This is only true if Hasjob is reporting g.anon_user to current_auth as an actor, which has not been handled yet in this PR. This was reserved for a future PR.
| def view_counts(self, **kwargs): | ||
| campaign = self.obj | ||
| timezone = current_auth.actor.timezone if current_auth else 'UTC' | ||
| timezone = current_auth.actor.timezone if current_auth.not_anonymous else 'UTC' |
There was a problem hiding this comment.
This one can be current_auth.actor.timezone if current_auth else 'UTC' provided the AnonUser object reports a timezone (which it should).
There was a problem hiding this comment.
We're not setting and using g.anon_user until we close that other PR that moved AnonUser to mouse interaction. So gonna leave it like this for now and fix it when I close that other PR.
hasjob/views/helper.py
Outdated
|
|
||
| # Prepare event session if it's not already present | ||
| if current_auth or g.anon_user and not g.esession: | ||
| if current_auth and not g.esession: |
There was a problem hiding this comment.
This is only true if Hasjob is reporting g.anon_user to current_auth as an actor, which has not been handled yet in this PR. This was reserved for a future PR.
|
Bibhas seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account. You have signed the CLA already but the status is still pending? Let us recheck it. |