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

Refacto de template tags et de Topic never_read #3650

Merged
merged 5 commits into from Jun 14, 2016

Conversation

@vhf
Copy link
Contributor

commented Jun 7, 2016

Q R
Type de modification évolution
Ticket(s) (issue(s)) concerné(s)

Je suis tombé sur un commentaire que j'ai voulu changé, puis j'ai suivi un lapin blanc. Un bon moyen de se refamiliariser avec la codebase.

Si vous cherchez la logique, je suis parti de zds/utils/templatetags/interventions.py. La première volée de commits visait à refactorer ses get_existing(), puis j'ai creusé son never_read().

QA

  • vérifier que les souscriptions aux topics s'ajoutent bien dans les différents éléments de l'interface
  • vérifier que les topics/posts se marquent bien et s'indiquent bien lus/non-lus
topic.last_post = post
topic.save()
TopicRead(post=topic.last_post, user=self.staff.user, topic=topic).save()
self.assertFalse(is_read(topic, author.user))

This comment has been minimized.

Copy link
@vhf

vhf Jun 7, 2016

Author Contributor

Question pour vous, pourquoi l'auteur d'un post a son propre message non-lu ?

This comment has been minimized.

Copy link
@GerardPaligot

GerardPaligot Jun 8, 2016

Member

C'est pareil pour les MPs et c'est un comportement hérité de PDP.

@vhf vhf added the C-Back label Jun 7, 2016

@coveralls

This comment has been minimized.

Copy link

commented Jun 7, 2016

Coverage Status

Coverage increased (+0.01%) to 87.594% when pulling d28eac7 on vhf:interventions-patch-1 into 5768c4e on zestedesavoir:dev.

@GerardPaligot

This comment has been minimized.

Copy link
Member

commented Jun 8, 2016

J'aime beaucoup cette PR. :)

content_type__pk=content_type.pk,
user=user, is_active=is_active,
by_email=by_email)
existing = self.get(**lookup)

This comment has been minimized.

Copy link
@artragis

artragis Jun 8, 2016

Member

<3

@gustavi

This comment has been minimized.

Copy link
Member

commented Jun 14, 2016

QA : OK !

Je merge, merci :)

@gustavi gustavi merged commit ceb82e3 into zestedesavoir:dev Jun 14, 2016

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

@gustavi gustavi added this to the Version de développement milestone Jun 14, 2016

@vhf vhf deleted the vhf:interventions-patch-1 branch Jul 20, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants
You can’t perform that action at this time.