@@ -0,0 +1,1166 @@
+%22%22%22Sets subscribedtomodulen_fld = 0 for all except St%C3%84lMs%22%22%22%0A%0A# imports%0Aimport sys%0Aimport os%0Aimport sqlalchemy%0Aimport csv%0A%0Asys.path.append(os.getcwd())  # Add . to path%0Asys.path.append(os.path.dirname(os.getcwd()))  # Add .. to path%0Afrom backend.ldaplogin import (get_member_with_real_name,%0A                DuplicateNamesException, PersonNotFoundException)%0Afrom backend import connect%0Afrom backend.orm import *%0Aimport passwordsafe%0A%0Aimport common%0A%0A# constants%0A# exception classes%0A# interface functions%0A# classes%0A# internal functions & classes%0A%0Adef main(session):%0A    ordinarie = common.get_members_with_membership(session,%0A                                                   %22Ordinarie medlem%22, True)%0A    for member in ordinarie:%0A        member.subscribedtomodulen_fld = 0%0A%0A    print(%22dirty count:%22, len(session.dirty))%0A%0A    if input(%22Are you sure %5By/n%5D? %22) == %22y%22:%0A        print(%22Committing...%22)%0A        session.commit()%0A        return%0A    print(%22Rolling back changes%22)%0A%0A%0A%0Aif __name__ == '__main__':%0A    ps = passwordsafe.PasswordSafe()%0A    SessionMaker = ps.connect_with_config(%22members%22)%0A    session = SessionMaker()%0A    status = main(session)%0A    sys.exit(status)%0A

Add subscribedtomodulen