def save(self, *args, **kwargs):
        if not self.pk:
            try:
                # Get the last slide order of the list
                last_slide = list(self.plugin.slides_list)[-1]
                self.order = last_slide.order + 1
            except __HOLE__:
                self.order = 1
        return super(Slide, self).save(*args, **kwargs)
dataset/ETHPy150Open ionyse/ionyweb/ionyweb/plugin_app/plugin_slideshow/models.py/Slide.save