[PATCH] pgarchives: pglister_sync: import lists with subscriber_access set to True

Поиск
Список
Период
Сортировка
От Célestin Matte
Тема [PATCH] pgarchives: pglister_sync: import lists with subscriber_access set to True
Дата
Msg-id 1d060463-e562-7783-decd-b5a7f3c4c06c@cmatte.me
обсуждение исходный текст
Ответы Re: [PATCH] pgarchives: pglister_sync: import lists with subscriber_access set to True
Re: [PATCH] pgarchives: pglister_sync: import lists with subscriber_access set to True
Список pgsql-www
pglister_sync.py is a script used to synchronize things between pglister and pgarchives: lists, subscribers etc.

subscriber_access is not set in pglister_sync's query, and is set to null=False in Django's model. As a consequence,
pglister_syncfails to add new lists:
 
Traceback (most recent call last):
  File "/srv/pgarchives/local/loader/pglister_sync.py", line 68, in <module>
    'groupname': l['group']['groupname'],
psycopg2.errors.NotNullViolation: null value in column "subscriber_access" violates not-null constraint
DETAIL:  Failing row contains (8, test-pglister-sync, test-pglister-sync, , t, 1, null).

I don't know if there is a way to configure postgres to use the default value , but I think it would be wiser to
explicitlyset this variable in pglister_sync.py.
 


By default, subscriber_access is set to False and there is no way to modify that within the web interface.
As a consequence, access to lists on private servers is restricted to superusers, and there is no easier way to modify
thatthan to edit the database manually.
 

It seems more logical to me that this value be set to True by default, as access can still be moderated to avoid lists
beingpublicly available.
 

That said, it may be better to have a way to modify that within the web interface in pglister.

-- 
Célestin Matte
Вложения

В списке pgsql-www по дате отправления:

Предыдущее
От: Eric Feng
Дата:
Сообщение: Re: Wiki editor request
Следующее
От: Célestin Matte
Дата:
Сообщение: Re: [PATCH] pgarchives: pglister_sync: import lists with subscriber_access set to True