Skip to content

Commit

Permalink
[DONE] Bugfixes for 3.7.0 (#1160)
Browse files Browse the repository at this point in the history
* 🔥 Remove useless message for AI enhancement

* 🛂 Modify permissions for AI message

* 🐛 Remove unnecesary spaces in alerts

---------

Co-authored-by: Sébastien Coze <[email protected]>
  • Loading branch information
AymericJak and SebastienCozeDev committed Jun 12, 2024
1 parent dea6a02 commit 5dedf14
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 15 deletions.
7 changes: 1 addition & 6 deletions pod/video/templates/videos/video_page_content.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

{% if video.is_draft %}
<div class="alert alert-secondary">
<p>{% trans "This video is in <strong>draft</strong>." %}</p>
{% trans "This video is in <strong>draft</strong>." %}
</div>
{% endif %}

Expand Down Expand Up @@ -88,11 +88,6 @@ <h4 class="accordion-header theme_title" id="theme_desc_title">
{% trans 'The video is currently waiting for Aristote AI treatment.' %}
</div>
{% endif %}
{% if enr_is_ready %}
<div class="alert alert-warning" role="alert">
{% trans 'The video was treated by Aristote. You must verify and validate the processing by pressing the robot icon.' %}
</div>
{% endif %}
{% if video.get_encoding_step == "" %}
<div class="alert alert-warning" role="alert">
{% trans 'The video is currently waiting for encoding.' %}
Expand Down
12 changes: 3 additions & 9 deletions pod/video/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@
from django.db.models import QuerySet
from django.db import transaction

from ..ai_enhancement.utils import enhancement_is_already_asked, enhancement_is_ready
from ..ai_enhancement.utils import enhancement_is_already_asked

RESTRICT_EDIT_VIDEO_ACCESS_TO_STAFF_ONLY = getattr(
settings, "RESTRICT_EDIT_VIDEO_ACCESS_TO_STAFF_ONLY", False
Expand Down Expand Up @@ -1084,15 +1084,9 @@ def video(request, slug, slug_c=None, slug_t=None, slug_private=None):
"active_video_comment": ACTIVE_VIDEO_COMMENT,
"enr_is_already_asked": enhancement_is_already_asked(video)
and (
request.user.is_staff
or request.user.is_superuser
or request.user == video.owner
),
"enr_is_ready": enhancement_is_ready(video)
and (
request.user.is_staff
or request.user.is_superuser
request.user.is_superuser
or request.user == video.owner
or request.user in video.additional_owners.all()
),
}
if request.GET.get("is_iframe"):
Expand Down

0 comments on commit 5dedf14

Please sign in to comment.