Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Un auteur qui voit son contenu republié doit suivre ce contenu #4243

Merged
merged 3 commits into from
Mar 18, 2017

Conversation

AmarOk1412
Copy link
Member

Q R
Type de modification correction de bug
Ticket(s) (issue(s)) concerné(s) #4238

QA

  • Faire valider un article ;
  • Vérifier que vous (l'auteur) le suivez bien ;
  • Modifier l'article ;
  • Le faire revalider ;
  • Constater que vous le suivez toujours.

@coveralls
Copy link

Coverage Status

Coverage decreased (-34.02%) to 54.628% when pulling 607067e on AmarOk1412:issue-4238 into 2edbdb5 on zestedesavoir:dev.

@coveralls
Copy link

coveralls commented Mar 13, 2017

Coverage Status

Coverage increased (+0.0008%) to 88.65% when pulling 607067e on AmarOk1412:issue-4238 into 2edbdb5 on zestedesavoir:dev.

@coveralls
Copy link

coveralls commented Mar 13, 2017

Coverage Status

Coverage increased (+0.0008%) to 88.65% when pulling 18db297 on AmarOk1412:issue-4238 into 2edbdb5 on zestedesavoir:dev.

Copy link
Member

@gllmc gllmc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lorsque je publie le contenu, je ne suis pas abonné. Est-ce que ça pourrait être lié à ce problème ?

@@ -249,7 +249,8 @@ def content_published_event(sender, **kwargs):
by_email = kwargs.get('by_email')
authors = list(content.authors.all())
for user in authors:
ContentReactionAnswerSubscription.objects.toggle_follow(content, user, by_email=by_email)
if not NewPublicationSubscription.objects.get_existing(user, user):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Est-ce qu'il ne faudrait pas plutôt mettre content comme deuxième argument ? Je vois mal pourquoi on utilise deux fois user.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

En fait, l'important c'est qu'on toggle_follow une seule fois. Au premier passage, NewPubli... est à None, et après subscription = NewPublicationSubscription.objects.get_or_create_active(user, user) elle existe.

Mais pour le coup, j'ai remplacé par ContentReactionAnswerSubscription.objects.get_existing(user, content) qui est plus clair, thx.

@coveralls
Copy link

coveralls commented Mar 14, 2017

Coverage Status

Coverage increased (+0.0008%) to 88.65% when pulling 4db51ee on AmarOk1412:issue-4238 into 2edbdb5 on zestedesavoir:dev.

Copy link
Member

@gllmc gllmc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

QA : OK !

@vhf vhf merged commit 034c1c0 into zestedesavoir:dev Mar 18, 2017
@vhf
Copy link
Contributor

vhf commented Mar 18, 2017

Merci @AmarOk1412 , merci @GCodeur !

@vhf vhf added this to the Version de développement milestone Mar 18, 2017
@vhf vhf added C-Back Concerne le back-end Django S-BUG Corrige un problème labels Mar 18, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-Back Concerne le back-end Django S-BUG Corrige un problème
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants