Skip to content

Commit

Permalink
Merge branch 'main' 1.2.16dev into production
Browse files Browse the repository at this point in the history
  • Loading branch information
LoanR committed Jul 23, 2024
2 parents c89a082 + f41ae63 commit d7949dc
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 16 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "poetry.core.masonry.api"

[tool.poetry]
name = "b3desk"
version = "1.2.15"
version = "1.2.16"
description = "Outil de visioconférence pour les agents de l'Education Nationale et de l'Etat en général."
authors = ["Your Name <[email protected]>"]
readme = "README.md"
Expand Down
2 changes: 1 addition & 1 deletion web/b3desk/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
from .utils import enum_converter
from .utils import model_converter

__version__ = "1.2.15"
__version__ = "1.2.16"

LANGUAGES = ["en", "fr"]

Expand Down
18 changes: 10 additions & 8 deletions web/b3desk/models/bbb.py
Original file line number Diff line number Diff line change
Expand Up @@ -189,21 +189,23 @@ def create(self):

# default file is sent right away since it is need as the background
# image for the meeting
xml = (
self.meeting_file_addition_xml([self.meeting.default_file])
if self.meeting.default_file
else None
)
request = self.bbb_request("create", "POST", params=params, data=xml)
# xml = (
# self.meeting_file_addition_xml([self.meeting.default_file])
# if self.meeting.default_file
# else None
# )
# TODO: xml as data is not sent anymore at BBB meeting creation to avoid delay
request = self.bbb_request("create", "POST", params=params)
data = self.bbb_response(request)

# non default files are sent later
if (
self.meeting.non_default_files
self.meeting.files
and "returncode" in data
and data["returncode"] == "SUCCESS"
):
xml = self.meeting_file_addition_xml(self.meeting.non_default_files)
xml = self.meeting_file_addition_xml(self.meeting.files)
# TODO: send all files and not only the non default ones
request = self.bbb_request(
"insertDocument", params={"meetingID": self.meeting.meetingID}
)
Expand Down
6 changes: 3 additions & 3 deletions web/b3desk/templates/meeting/files.html
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ <h2 class="fr-h3">Vous pouvez ajouter un fichier :</h2>
<caption>Vos fichiers associés sont :</caption>
<thead>
<tr>
<th scope="col">Défaut</th>
<!-- <th scope="col">Défaut</th> -->
<th scope="col">Téléchargeable</th>
<th id="titleFileColumn" scope="col">Titre</th>
<th scope="col">Ajouté le</th>
Expand Down Expand Up @@ -176,7 +176,7 @@ <h1 id="delete-file-{{ file.id }}-title" class="fr-modal__title">
</dialog>

<tr id="{{ file.id }}" >
<td>
<!-- <td>
<div class="fr-toggle">
{% if file.is_default %}
<input disabled onclick=submitDefaultFile(event) checked type="checkbox" class="fr-toggle__input" id="isDefault-{{ file.id }}">
Expand All @@ -186,7 +186,7 @@ <h1 id="delete-file-{{ file.id }}-title" class="fr-modal__title">
<label class="fr-toggle__label" for="isDefault-{{ file.id }}" data-fr-checked-label="Oui" data-fr-unchecked-label="Non"></label>
{% endif %}
</div>
</td>
</td> -->
<td>
<div class="fr-toggle">
{% if file.is_downloadable %}
Expand Down
7 changes: 4 additions & 3 deletions web/tests/meeting/test_meeting.py
Original file line number Diff line number Diff line change
Expand Up @@ -326,8 +326,9 @@ def test_create_with_only_a_default_file(
):
"""Tests the BBB meeting creation request.
As there is a default file attached to the meeting, it should be
sent right away, and no background upload task should be called.
A default file, which is no longer a real functionnality, attached
to the meeting, should always be sent asynchronously, background
upload task should be called.
"""
client_app.app.config["FILE_SHARING"] = True

Expand Down Expand Up @@ -411,7 +412,7 @@ def test_create_with_only_a_default_file(
"uploadExternalUrl": f"http://localhost:5000/meeting/{str(meeting.id)}/externalUpload",
}

assert not mocked_background_upload.called
assert mocked_background_upload.called


def test_create_with_files(
Expand Down

0 comments on commit d7949dc

Please sign in to comment.