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

15th
Jun 2018
Saurav Tiwary
@srv-twry
Jun 15 2018 03:56
@schedutron @mayank8318 @bhaveshAn @maxlorenz Please review: fossasia/open-event-server#4858. It is required for implementing Orders API and needs to be merged as early as possible.
Saurav Tiwary
@srv-twry
Jun 15 2018 05:30
Can someone explain the use of this property ?
@property
    def serialize(self):
        """Return object data in easily serializable format"""

        session_data = [{'title': session.title, 'id': session.id}
                        for session in self.sessions]

        return {
            'id': self.id,
            'name': self.name,
            'photo_url': self.photo_url,
            'thumbnail_image_url': self.thumbnail_image_url,
            'small_image_url': self.small_image_url,
            'icon_image_url': self.icon_image_url,
            'short_biography': self.short_biography,
            'long_biography': self.long_biography,
            'speaking_experience': self.speaking_experience,
            'email': self.email,
            'mobile': self.mobile,
            'website': self.website,
            'twitter': self.twitter,
            'facebook': self.facebook,
            'github': self.github,
            'linkedin': self.linkedin,
            'organisation': self.organisation,
            'position': self.position,
            'country': self.country,
            'city': self.city,
            'gender': self.gender,
            'heard_from': self.heard_from,
            'sponsorship_required': self.sponsorship_required,
            'sessions': session_data
        }
I couldn't find the place from where this method is called.
A few of the models have this propery for eg. Speakers, but some of them don't for eg. Session
Mayank Vaidya
@mayank8318
Jun 15 2018 05:49
I think that was used in version 1 for responses or exports or where you needed to log errors etc
Not sure though
Saurabh Chaturvedi
@schedutron
Jun 15 2018 07:45
Yes @mayank8318. I think this essentially just converts the Python object to its corresponding JSON during exports. Again, I'm also not sure. This method is implemented for some objects, while for others, it's absent.
Bhavesh Anand
@bhaveshAn
Jun 15 2018 08:44
@schedutron @mayank8318 @srv-twry @maxlorenz @ritikamotwani @pradeepgangwar Please review fossasia/open-event-server#4803
It is required for updating Events Role Permissions in Admin dashboard. Which is a priority right now.
Saurav Tiwary
@srv-twry
Jun 15 2018 08:53
Please remove these screenshots. They are already present on the PR.
Saurav Tiwary
@srv-twry
Jun 15 2018 09:01

@schedutron @mayank8318 @srv-twry @maxlorenz @ritikamotwani @pradeepgangwar Please review fossasia/open-event-server#4803
It is required for updating Events Role Permissions in Admin dashboard. Which is a priority right now.

Done.

Saurav Tiwary
@srv-twry
Jun 15 2018 13:32
@bhaveshAn Please review and merge this: fossasia/open-event-server#4858
It has been approved by 2 reviewers with merge rights and can be merged now. Thanks