public inbox for [email protected]  
help / color / mirror / Atom feed
From: Célestin Matte <[email protected]>
To: [email protected]
Subject: Re: [PATCH] pgarchives: pglister_sync: import lists with subscriber_access set to True
Date: Fri, 28 Jan 2022 18:43:01 +0100
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>
References: <[email protected]>

Sorry, accidentally sent unfinished email containing contradictory information... Please ignore the previous one.


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_sync fails 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 explicitly set this variable in pglister_sync.py (attached patch in previous email)

It seems more logical to me to set this value to True, as otherwise access to lists on private servers is restricted to superusers, and there is no easier way to modify that than to edit the database manually. But then, the model may need to be update to have this value set to default=True as well. What do you think?

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





reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected]
  Subject: Re: [PATCH] pgarchives: pglister_sync: import lists with subscriber_access set to True
  In-Reply-To: <[email protected]>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox