mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-02-21 22:31:48 +01:00
msggen: allow backfilling of already deprecated fields
This commit is contained in:
parent
c9a9d62367
commit
6db56180f9
1 changed files with 3 additions and 0 deletions
|
@ -86,6 +86,9 @@ class VersionAnnotationPatch(Patch):
|
|||
if isinstance(f.deprecated, list):
|
||||
assert len(f.deprecated) == 2
|
||||
f.deprecated = f.deprecated[0]
|
||||
# We may have already deprecated some things before backfilling them
|
||||
if f.deprecated is not None and deprecated is None:
|
||||
deprecated = f.deprecated
|
||||
if f.deprecated != deprecated:
|
||||
raise ValueError(
|
||||
f"Field {f.path} changed `deprecated` annotation: {f.deprecated} vs {deprecated}"
|
||||
|
|
Loading…
Add table
Reference in a new issue