[GH-ISSUE #204] request.user.is_superuser or request.user.is_staff or not userinstance.is_template #136

Closed
opened 2026-02-27 15:57:28 +03:00 by kerem · 2 comments
Owner

Originally created by @catborise on GitHub (Nov 7, 2018).
Original GitHub issue: https://github.com/retspen/webvirtcloud/issues/204

hi @honza801

i am not sure i think there is logic error. can you please check it. i do not want to break logic.

{% if media_iso and request.user.is_superuser or request.user.is_staff or not userinstance.is_template %}
(instance.html)

there is not any media_iso but you could call mount_iso function with 'none' value. It causes error

thanks

Originally created by @catborise on GitHub (Nov 7, 2018). Original GitHub issue: https://github.com/retspen/webvirtcloud/issues/204 hi @honza801 i am not sure i think there is logic error. can you please check it. i do not want to break logic. `{% if media_iso and request.user.is_superuser or request.user.is_staff or not userinstance.is_template %}` (instance.html) there is not any media_iso but you could call mount_iso function with 'none' value. It causes error thanks
kerem closed this issue 2026-02-27 15:57:28 +03:00
Author
Owner

@honza801 commented on GitHub (Nov 7, 2018):

hmm, django templates cannot use parenthesis in conditionals... i had to put it into view :(

check latest commit in master branch
github.com/honza801/webvirtcloud@3d43aa392c

fous

<!-- gh-comment-id:436611995 --> @honza801 commented on GitHub (Nov 7, 2018): hmm, django templates cannot use parenthesis in conditionals... i had to put it into view :( check latest commit in master branch https://github.com/honza801/webvirtcloud/commit/3d43aa392c009a1b81fe8995459e4b989a8f24bb fous
Author
Owner

@catborise commented on GitHub (Nov 8, 2018):

thanks. it works.

<!-- gh-comment-id:436969883 --> @catborise commented on GitHub (Nov 8, 2018): thanks. it works.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/webvirtcloud#136
No description provided.