[PATCH 1/3] models.Event: Add the user responsible for the event
Johan Herland
johan at herland.net
Tue Oct 8 04:14:21 AEDT 2019
On Mon, Oct 7, 2019 at 5:57 PM Stephen Finucane <stephen at that.guru> wrote:
> On Mon, 2019-10-07 at 00:57 +0200, Johan Herland wrote:
> > This allows using the events as a kind of audit log, to see how a
> > patch came to its current state/delegate.
> >
> > Cc: Mauro Carvalho Chehab <mchehab at osg.samsung.com>
> > Signed-off-by: Johan Herland <johan at herland.net>
>
> This looks good, though the second patch in the series needs work so
> I'm going to hold off applying this quite yet.
>
> Reviewed-by: Stephen Finucane <stephen at that.guru>
Thanks. I like your name 'actor' better, though, so I'll re-roll this
with that change.
> > + operations = [
> > + migrations.AddField(
> > + model_name='event',
> > + name='user',
> > + field=models.ForeignKey(blank=True, help_text=b'The user that created this event.', null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to=settings.AUTH_USER_MODEL),
>
> Yeah, setting it to NULL is probably the correct action in this
> situation.
Yes, I think so. From looking around models.py, I got the impression
that .deletion.CASCADE was much more common (maybe even overused?), so
I was not sure, but I do think it's more appropriate in this case, at
least.
Thanks for the review!
...Johan
More information about the Patchwork
mailing list