Esempio n. 1
0
 def has_userdatas(self):
     """
     Return True if the current object has userdatas associated to it
     """
     from autonomie.models.user.userdatas import UserDatas
     query = DBSESSION().query(UserDatas.id)
     query = query.filter(UserDatas.user_id == self.id)
     count = query.count()
     return count >= 1
Esempio n. 2
0
 def has_userdatas(self):
     """
     Return True if the current object has userdatas associated to it
     """
     from autonomie.models.user.userdatas import UserDatas
     query = DBSESSION().query(UserDatas.id)
     query = query.filter(UserDatas.user_id == self.id)
     count = query.count()
     return count >= 1
 def check(cls, node):
     """
     Check if all indicators are successfull
     :param obj node: The node for which we check the indicators
     """
     query = DBSESSION().query(SaleFileRequirement.id)
     query = query.filter_by(node_id=node.id)
     query = query.filter(
         SaleFileRequirement.status != SaleFileRequirement.SUCCESS_STATUS)
     return query.count() == 0
 def check(cls, node):
     """
     Check if all indicators are successfull
     :param obj node: The node for which we check the indicators
     """
     query = DBSESSION().query(SaleFileRequirement.id)
     query = query.filter_by(node_id=node.id)
     query = query.filter(
         SaleFileRequirement.status != SaleFileRequirement.SUCCESS_STATUS
     )
     return query.count() == 0