Commit bd56aad03b3dff00bda791accb2a0827702f1696
Exists in
master
Merge branch 'refactoring'
Showing
3 changed files
with
12810 additions
and
3 deletions
Show diff stats
No preview for this file type
api/views.py
@@ -327,6 +327,8 @@ class ChatViewset(viewsets.ModelViewSet, LogMixin): | @@ -327,6 +327,8 @@ class ChatViewset(viewsets.ModelViewSet, LogMixin): | ||
327 | 327 | ||
328 | messages = TalkMessages.objects.filter((Q(talk__user_one__email = username) & Q(talk__user_two__email = user_two)) | (Q(talk__user_one__email = user_two) & Q(talk__user_two__email = username))).order_by('-create_date') | 328 | messages = TalkMessages.objects.filter((Q(talk__user_one__email = username) & Q(talk__user_two__email = user_two)) | (Q(talk__user_one__email = user_two) & Q(talk__user_two__email = username))).order_by('-create_date') |
329 | 329 | ||
330 | + ChatVisualizations.objects.filter(Q(user = user) & Q(message__talk__user_two__email = user_two) & Q(viewed = False)).update(viewed = True) | ||
331 | + | ||
330 | page = [] | 332 | page = [] |
331 | 333 | ||
332 | for i in range(messages_by_page*(n_page - 1), (n_page*messages_by_page)): | 334 | for i in range(messages_by_page*(n_page - 1), (n_page*messages_by_page)): |
pendencies/forms.py
@@ -205,14 +205,14 @@ class PendenciesLimitedForm(forms.ModelForm): | @@ -205,14 +205,14 @@ class PendenciesLimitedForm(forms.ModelForm): | ||
205 | 205 | ||
206 | if not begin_date == ValueError and begin_date: | 206 | if not begin_date == ValueError and begin_date: |
207 | if begin_date.date() > limit_submission_date.date(): | 207 | if begin_date.date() > limit_submission_date.date(): |
208 | - self.add_error('begin_date', _('This input should be filled with a date equal or before the goals submission limit date.("%s")')%(subject.limit_submission_date.date())) | 208 | + self.add_error('begin_date', _('This input should be filled with a date equal or before the goals submission limit date.("%s")')%(limit_submission_date.date())) |
209 | 209 | ||
210 | if not end_date == ValueError and end_date: | 210 | if not end_date == ValueError and end_date: |
211 | if end_date.date() > limit_submission_date.date(): | 211 | if end_date.date() > limit_submission_date.date(): |
212 | - self.add_error('end_date', _('This input should be filled with a date equal or before the goals submission limit date.("%s")')%(subject.limit_submission_date.date())) | 212 | + self.add_error('end_date', _('This input should be filled with a date equal or before the goals submission limit date.("%s")')%(limit_submission_date.date())) |
213 | 213 | ||
214 | if not limit_date == ValueError and limit_date: | 214 | if not limit_date == ValueError and limit_date: |
215 | if limit_date.date() > limit_submission_date.date(): | 215 | if limit_date.date() > limit_submission_date.date(): |
216 | - self.add_error('limit_date', _('This input should be filled with a date equal or before the goals submission limit date.("%s")')%(subject.limit_submission_date.date())) | 216 | + self.add_error('limit_date', _('This input should be filled with a date equal or before the goals submission limit date.("%s")')%(limit_submission_date.date())) |
217 | 217 | ||
218 | return cleaned_data | 218 | return cleaned_data |