Skip to content

behavior of commands if both, a record and a draft, exist #51

@martinobersteiner

Description

@martinobersteiner

as the title states, this concerns behavior of commands when given a --pid to which there exists both, a record and a draft
for example, updating the JSON in the database in this case has (at least) the following considerations:

  • a draft might have been created by a user
  • the draft might differ from the record in many ways
    • this includes the draft having updated part of the JSON relevant to the command
    • a draft's JSON is also allowed to be malformed or unfinished (it is just a draft after all)
  • so which JSON should be used to update upon? The one from draft or the one from record?

handling all these possible cases automatically seems difficult, if a generalized solution exists at all
this case is probably rare though

so suggested course of actions is:

  • make sure all commands use get_<thing> functions provided by this package for getting stuff from database
  • make relevant get_<thing> functions raise when a draft exists, requiring the CLI-user to first publish/remove it

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions