Changeset 777e9b2


Ignore:
Timestamp:
Jan 22, 2012, 11:20:41 PM (14 years ago)
Author:
Alex Dehnert <adehnert@…>
Branches:
master, space-access, stable, stage
Children:
a8cd440
Parents:
8a8ba4c
git-author:
Alex Dehnert <adehnert@…> (01/22/12 23:20:41)
git-committer:
Alex Dehnert <adehnert@…> (01/22/12 23:20:41)
Message:

Import notes and other account ids from the old DB

File:
1 edited

Legend:

Unmodified
Added
Removed
  • asadb/util/import_db.py

    r8a8ba4c r777e9b2  
    8585    g.save()
    8686
     87    if d['NOTE']:
     88        notes, created = groups.models.GroupNote.objects.get_or_create(group=g, author='importer/legacy-notes@SYSTEM', )
     89        notes.body = d['NOTE']
     90        notes.acl_read_group = False
     91        notes.acl_read_office = False
     92        notes.save()
     93
     94    if d['OTHER_ACCOUNT_IDS']:
     95        accounts, created = groups.models.GroupNote.objects.get_or_create(group=g, author='importer/other-accounts@SYSTEM', )
     96        accounts.body = d['OTHER_ACCOUNT_IDS']
     97        accounts.acl_read_group = True
     98        accounts.acl_read_office = True
     99        accounts.save()
    87100
    88101@transaction.commit_on_success
Note: See TracChangeset for help on using the changeset viewer.