These are chat archives for fossasia/open-event-server

20th
Jun 2018
Ritika
@ritikamotwani
Jun 20 2018 09:15
Regarding the issue of frontend unique speakers being displayed
Shouldn’t the speakers end point return unique speakers by default ?
Like if you are a speaker. You have one session. Then you go ahead and get another session for you. So in the frontend even if I use the unique property the sessions will be different in the two rows stored in the database and it will result in showing that speaker twice in the list.
Mayank Vaidya
@mayank8318
Jun 20 2018 09:17
Yes, it should but currently what is happening is every time a new speaker is created in the database
And the created session is linked to that speaker
Ritika
@ritikamotwani
Jun 20 2018 09:18
Yes I added myself as a speaker twice with different sessions and checked the table of the speakers the row came twice with my name.
Mayank Vaidya
@mayank8318
Jun 20 2018 09:19
Yes, because two speakers were created in the db
Saurav Tiwary
@srv-twry
Jun 20 2018 09:19
@ritikamotwani I agree.
A simple way to ensure this in the server would be to check whether a speaker already exists with that email and for that event in the before_post or before_create_object method of the post speaker api. @mayank8318 If you want you can add this :smile:
Mayank Vaidya
@mayank8318
Jun 20 2018 09:19
You did it with the FE right?
Saurav Tiwary
@srv-twry
Jun 20 2018 09:20
Raise a ConflictException saying that a "A speaker profile already exists for this event with this email"
Something like this.
Ritika
@ritikamotwani
Jun 20 2018 09:20
Yes exactly @srv-twry.
Saurav Tiwary
@srv-twry
Jun 20 2018 09:21
But do ensure that you check for the event also. For eg. A user must be able to create multiple speaker profiles for different events.
Mayank Vaidya
@mayank8318
Jun 20 2018 09:24
I think raising ConflictException is right here because that endpoint is for creating a new speaker
And each speaker should be a unique user(email-id)
Also, we are changing the FE to enable the user to add "Existing Speakers" so we will call the update endpoint then
Saurav Tiwary
@srv-twry
Jun 20 2018 09:26

And each speaker should be a unique user(email-id)

No @mayank8318 One user can have multiple speaker profiles but only one for a specific event.
for e.g. I can speak at Google I/O 18 and Fossasia Summit 2019 hence I will have two speaker profiles associated with my user
But I should only be allowed one speaker profile per event.

Ritika
@ritikamotwani
Jun 20 2018 09:26
Okay :+1:
Mayank Vaidya
@mayank8318
Jun 20 2018 09:26
Okay, so event should be unique then right?
Saurav Tiwary
@srv-twry
Jun 20 2018 09:27
Yes, one speaker profile for a user per event.
Harsimar
@simarsingh24
Jun 20 2018 10:35
please look into issue #4922
Mayank Vaidya
@mayank8318
Jun 20 2018 10:44
Screenshot from 2018-06-20 16-13-45.png
@niranjan94 @SaptakS @srv-twry @pradeepgangwar @bhaveshAn @maxlorenz @Kreijstal I think that there are some irregularities regarding the "Upload File" endpoint. The docs say that "This endpoint supports uploading of any kind of file or multiple files. If a single file is to be uploaded, send a single file in the keyword file, else if multiple files, send an array of files in the keyword files. After saving in it’s prefered storage (local, google storage, s3, etc.), the URL or array of URLs returned as response. force_local parameter can be set to true to force storage in local." But the example request shows something else. So while accessing the endpoint from the server we are getting a 400 bad request
Screenshot from 2018-06-20 16-15-44.png
Saurav Tiwary
@srv-twry
Jun 20 2018 10:47
@mayank8318 In the second screenshot of yours, you've a trailing ?. Can this cause an error ?
In the Request URL
I guess the request is wrong
Saurav Tiwary
@srv-twry
Jun 20 2018 10:54
okay okay, delete the above code snippet. It's way too long. You can create an issue and may be paste it there.
Saurav Tiwary
@srv-twry
Jun 20 2018 13:02
Guys are we assuming that the attendee of an event will always be a registered user on the platform ? IMO no because I should be able to buy tickets for me and my friends. Right ? @mayank8318 @maxlorenz @schedutron @bhaveshAn
Bhavesh Anand
@bhaveshAn
Jun 20 2018 13:15
@srv-twry I agree attendee of an event should not necessarily be a registered one.

In the second screenshot of yours, you've a trailing ?. Can this cause an error ?

@mayank8318 In POST you are using ? check once again

Mario Behling
@mariobehling
Jun 20 2018 13:52
@srv-twry In Eventbrite it is possible to get a ticket without registering for the platform, but actually once you pay they register you. So, if you then login with your email you will see all the tickets you bought with the specific user ID. Could you try it out, please and let us know about your experience?
Mayank Vaidya
@mayank8318
Jun 20 2018 13:53
@bhaveshAn I checked by adding a print statement in the API and it went in the right route.. check the api link I have posted
Saurav Tiwary
@srv-twry
Jun 20 2018 13:57

@srv-twry In Eventbrite it is possible to get a ticket without registering for the platform, but actually once you pay they register you. So, if you then login with your email you will see all the tickets you bought with the specific user ID. Could you try it out, please and let us know about your experience?

@mariobehling Yeah I will try it out.

Saurav Tiwary
@srv-twry
Jun 20 2018 14:22

@niranjan94 @SaptakS I am having difficulties in trying to understand the overall workflow of how users can buy tickets. This is what I understood so far:
Let's say I am a registered user on the platform and I decided to buy 10 tickets. So I will place an order for 10 tickets.
Now the order would need 10 ticket holders. So the FE would first create 10 attendees. 1 of those 10 will be linked to my user account(since I am a registered user) and 9 others won't have any associated user account.
Now we will post the order, charge and do other stuff with the order that we want....

Is this interpretation correct ?

If no, then please explain.
If yes, then I have a small question. For creating an attendee one needs to provide the first name and last name. How will we handle that ? Provide placeholder names ?

PS: I'll look into allowing unregistered users to buy tickets like EventBrite after this but first I want to make sure I understand the existing flow of v1.

Niranjan Rajendran
@niranjan94
Jun 20 2018 14:24
The form will get the input of the attendee names.
From the person who is booking.
Please check the legacy server.
Saurav Tiwary
@srv-twry
Jun 20 2018 14:25
Thanks @niranjan94