diff --git a/vc_vidyo/indico_vc_vidyo/blueprint.py b/vc_vidyo/indico_vc_vidyo/blueprint.py index 1617a5d..c456817 100644 --- a/vc_vidyo/indico_vc_vidyo/blueprint.py +++ b/vc_vidyo/indico_vc_vidyo/blueprint.py @@ -14,6 +14,8 @@ # You should have received a copy of the GNU General Public License # along with Indico; if not, see . +from __future__ import unicode_literals + from indico.core.plugins import IndicoPluginBlueprint from indico_vc_vidyo.controllers import RHVidyoRoomOwner diff --git a/vc_vidyo/indico_vc_vidyo/cli.py b/vc_vidyo/indico_vc_vidyo/cli.py index 3140bf2..fa194a6 100644 --- a/vc_vidyo/indico_vc_vidyo/cli.py +++ b/vc_vidyo/indico_vc_vidyo/cli.py @@ -16,9 +16,6 @@ from __future__ import unicode_literals -import sys -from dateutil import rrule - from flask_script import Manager from terminaltables import AsciiTable diff --git a/vc_vidyo/indico_vc_vidyo/controllers.py b/vc_vidyo/indico_vc_vidyo/controllers.py index 8beee4a..a02140a 100644 --- a/vc_vidyo/indico_vc_vidyo/controllers.py +++ b/vc_vidyo/indico_vc_vidyo/controllers.py @@ -14,6 +14,8 @@ # You should have received a copy of the GNU General Public License # along with Indico; if not, see . +from __future__ import unicode_literals + import transaction from flask import flash, jsonify, session diff --git a/vc_vidyo/indico_vc_vidyo/plugin.py b/vc_vidyo/indico_vc_vidyo/plugin.py index 089c0aa..6196e53 100644 --- a/vc_vidyo/indico_vc_vidyo/plugin.py +++ b/vc_vidyo/indico_vc_vidyo/plugin.py @@ -154,8 +154,8 @@ class VidyoPlugin(VCPluginMixin, IndicoPlugin): defined in Vidyo plugin's settings, in that order. :param vc_room: VCRoom -- The VC room from which to create the Vidyo - room - :param event: Conference -- The event to the Vidyo room will be attached + room + :param event: Event -- The event to the Vidyo room will be attached """ client = AdminClient(self.settings) owner = retrieve_principal(vc_room.data['owner'], allow_groups=False, legacy=False) diff --git a/vc_vidyo/indico_vc_vidyo/task.py b/vc_vidyo/indico_vc_vidyo/task.py index dbebc74..ce71b5c 100644 --- a/vc_vidyo/indico_vc_vidyo/task.py +++ b/vc_vidyo/indico_vc_vidyo/task.py @@ -39,8 +39,8 @@ def find_old_vidyo_rooms(max_room_event_age): recently_used = (db.session.query(VCRoom.id) .filter(VCRoom.type == 'vidyo', Event.end_dt > (now_utc() - timedelta(days=max_room_event_age))) - .join(VCRoomEventAssociation) - .join(Event) + .join(VCRoom.events) + .join(VCRoomEventAssociation.event_new) .group_by(VCRoom.id)) # non-deleted rooms with no recent associations diff --git a/vc_vidyo/indico_vc_vidyo/templates/buttons.html b/vc_vidyo/indico_vc_vidyo/templates/buttons.html index 706fc2e..6cc0eb5 100644 --- a/vc_vidyo/indico_vc_vidyo/templates/buttons.html +++ b/vc_vidyo/indico_vc_vidyo/templates/buttons.html @@ -1,5 +1,5 @@ {% macro render_make_me_owner(event, vc_room, event_vc_room, extra_classes='') %} - {% if session.user != vc_room.vidyo_extension.owned_by_user and event.as_event.can_manage(session.user) %} + {% if session.user != vc_room.vidyo_extension.owned_by_user and event.can_manage(session.user) %}