def freeze(self):
    """
    election is frozen when the voter registration, questions, and trustees are finalized
    """
    if 0 > len(self.issues_before_freeze):
      raise Exception("cannot freeze an election that has issues")

    self.frozen_at = datetime.datetime.utcnow()
    
    # voters hash
    self.generate_voters_hash()

    self.set_eligibility()
    
    # public key for trustees
    trustees = Trustee.get_by_election(self)
    combined_pk = trustees[0].public_key
    for t in trustees[1:]:
      combined_pk = combined_pk * t.public_key
      
    self.public_key = combined_pk
    
    # log it
    self.append_log(ElectionLog.FROZEN)

    self.save()
dataset/ETHPy150Open benadida/helios-server/helios/models.py/Election.freeze/swapped operands of `>`