[pbs-devel] applied: [PATCH proxmox-backup] api2/config/tape_backup_job: fix duplicate id parameter
Dietmar Maurer
dietmar at proxmox.com
Wed Feb 24 08:28:54 CET 2021
Seems there is another problem with the Updater:
I can delete properties if I use normal rust naming, e.g.
job.update_from(update, "eject_media")?;
But it does not work with kebab-case:
job.update_from(update, "eject-media")?; // this fails silently
Please can we:
- support kebab-case
- raise error with unknown property names
> On 02/24/2021 7:13 AM Dietmar Maurer <dietmar at proxmox.com> wrote:
>
>
> > On 02/23/2021 8:27 PM Dietmar Maurer <dietmar at proxmox.com> wrote:
> >
> >
> > Will fix this tomorrow - we need to set the #[fixed] attribute for id
>
> Just saw that we already set the #[updater(fixed)] attribute.
>
> The docs say:
>
> > Additionally the #[updater(fixed)] option is available to make it illegal
> > for an updater to modify a field (generating an error if it is set),
> > while still allowing it to be used to create a new object via the build_from() method.
>
> So the Updater includes all "fixed" fields (which leads to the duplicate id problem).
>
> I would prefer an Updater which simply omits fixed fields.
>
> Can we change that?
More information about the pbs-devel
mailing list