Merge branch 'bugfix' into 'master'

com: fix 500 error when utbm mail server refuse weekmail

See merge request ae/Sith!260
This commit is contained in:
Antoine Bartuccio 2019-11-25 14:18:22 +01:00
commit ad8bcc7282

View File

@ -449,7 +449,7 @@ class WeekmailPreviewView(ComTabsMixin, CanEditPropMixin, DetailView):
) )
except: except:
pass pass
return super(WeekmailEditView, self).get(request, *args, **kwargs) return super(WeekmailPreviewView, self).get(request, *args, **kwargs)
def get_object(self, queryset=None): def get_object(self, queryset=None):
return self.model.objects.filter(sent=False).order_by("-id").first() return self.model.objects.filter(sent=False).order_by("-id").first()