diff options
| author | Magnus Hagander | 2022-01-30 12:16:55 +0000 |
|---|---|---|
| committer | Magnus Hagander | 2022-01-30 12:16:55 +0000 |
| commit | 6b9fedb2c69ea634b9f04a7fdd138783f8735289 (patch) | |
| tree | 8258954067e110489706d44cd95a03a58f99daf4 /loader | |
| parent | b09ac1cb58b67056b2fb0caeeb6bfd37564687cd (diff) | |
Ensure pglister_sync includes a value for subscriber_access
This has a default=False set in the django model, but django does not
propagate that into the database which would cause the insert of new
lists to fail with a not-null-violation.
Spotted by Célestin Matte
Diffstat (limited to 'loader')
| -rwxr-xr-x | loader/pglister_sync.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/loader/pglister_sync.py b/loader/pglister_sync.py index f95d369..d7e1925 100755 --- a/loader/pglister_sync.py +++ b/loader/pglister_sync.py @@ -60,7 +60,7 @@ if __name__ == "__main__": 'name': l['listname'], }) if curs.rowcount == 0: - curs.execute("INSERT INTO lists (listname, shortdesc, description, active, groupid) SELECT %(name)s, %(name)s, %(desc)s, 't', groupid FROM listgroups WHERE groupname=%(groupname)s RETURNING listid, listname", { + curs.execute("INSERT INTO lists (listname, shortdesc, description, active, groupid, subscriber_access) SELECT %(name)s, %(name)s, %(desc)s, 't', groupid, 'f' FROM listgroups WHERE groupname=%(groupname)s RETURNING listid, listname", { 'name': l['listname'], 'desc': l['longdesc'], 'groupname': l['group']['groupname'], |
