Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Avu metadata, uploaded to iRODS, does not have 'units' field when it is set to '0' or empty string #257

Open
marcomoscasgr opened this issue May 9, 2022 · 0 comments

Comments

@marcomoscasgr
Copy link
Contributor

After uploading avu metadata to iRODS with 'units' set to '0' or empty string, the 'units' field is not found by get_avu function from the iRODS API. The value of units is evaluated to false in the following code parts, skipping the 'units' key creation:

my $spec = {operation => 'metamod',
arguments => $args,
target => {collection => $collection,
avus => [{attribute => $attribute,
value => $value}]}};
if ($units) {
$spec->{target}->{avus}->[0]->{units} = $units;
}

my $spec = {operation => 'metamod',
arguments => $args,
target => {collection => $collection,
data_object => $data_name,
avus => [{attribute => $attribute,
value => $value}]}};
if ($units) {
$spec->{target}->{avus}->[0]->{units} = $units;
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant