args = "text username"
def handle(self, *args, **options):
- text = args[0]
- username = args[1]
+ text = args[1]
+ username = args[0]
user = User.objects.get(username=username)
room = Room.objects.get(name='site')
message = Message.objects.create_message(user, room, text)
path = dir + os.sep + filename
collection_id = '_'.join([department_name, course_id, course_type])
- department, c = Department.objects.get_or_create(name=department_name,
- organization=organization)
- if Conference.objects.filter(public_id=public_id):
- conference = Conference.objects.get(public_id=public_id)
+ department = Department.objects.filter(name=department_name,
+ organization=organization)
+ if Conference.objects.filter(public_id=public_id) and department:
+ conference = Conference.objects.get(public_id=public_id)
+ department = Department.objects.get(name=department_name,
+ organization=organization)
exist = False
medias = conference.media.all()
for media in medias: