launchpad-reviewers team mailing list archive
-
launchpad-reviewers team
-
Mailing list archive
-
Message #23948
Re: [Merge] lp:~twom/launchpad/null-controls-cause-errors into lp:launchpad
Review: Approve
Diff comments:
> === modified file 'lib/lp/soyuz/model/sourcepackagerelease.py'
> --- lib/lp/soyuz/model/sourcepackagerelease.py 2017-03-29 09:28:09 +0000
> +++ lib/lp/soyuz/model/sourcepackagerelease.py 2019-09-05 13:49:27 +0000
> @@ -144,7 +144,10 @@
> if 'copyright' in kwargs:
> copyright = kwargs.pop('copyright')
> super(SourcePackageRelease, self).__init__(*args, **kwargs)
> - self.copyright = copyright
> + # PostgresSQL text columns can't contain null
> + # characters, so remove them as this is only
> + # used for display
> + self.copyright = copyright.replace("\0", "")
I think copyright can be None (at any rate the DB column isn't NOT NULL), so I'd add a guard for that here just to be on the safe side.
>
> def __repr__(self):
> """Returns an informative representation of a SourcePackageRelease."""
--
https://code.launchpad.net/~twom/launchpad/null-controls-cause-errors/+merge/372343
Your team Launchpad code reviewers is subscribed to branch lp:launchpad.
References