Revision 1b52192e snf-astakos-app/astakos/im/models.py

b/snf-astakos-app/astakos/im/models.py
1789 1789

  
1790 1790
    def resume(self, actor=None, reason=None):
1791 1791
        self.set_state(self.NORMAL, actor=actor, reason=reason)
1792
        if self.name is None:
1793
            self.name = self.application.name
1794
            self.save()
1792 1795

  
1793 1796
    ### Logical checks
1794 1797

  
......
1849 1852
    objects = ProjectLogManager()
1850 1853

  
1851 1854

  
1855
class ProjectLock(models.Model):
1856
    objects = ForUpdateManager()
1857

  
1858

  
1852 1859
class ProjectMembershipManager(ForUpdateManager):
1853 1860

  
1854 1861
    def any_accepted(self):
......
2003 2010
        return self.set_state(s, actor=actor, reason=reason)
2004 2011

  
2005 2012

  
2006
class Serial(models.Model):
2007
    serial = models.AutoField(primary_key=True)
2008

  
2009

  
2010 2013
class ProjectMembershipLogManager(models.Manager):
2011 2014
    def last_logs(self, memberships):
2012 2015
        logs = self.filter(membership__in=memberships).order_by("-date")

Also available in: Unified diff