Project

General

Profile

« Previous | Next » 

Revision 6b8062b5

Added by Bernd Bleßmann over 1 year ago

S:M:Record: fix check, ob validiy token übergeben wurde.

Das token kann auch leer sein, z.B. wenn das record schon einmal
gespeichert wurde, also eine id hat.

View differences:

SL/Model/Record.pm
# validity token
my $validity_token;
if (my $validity_token_specs = $params{with_validity_token}) {
if (!defined $validity_token_specs->{scope} || !defined $validity_token_specs->{token}) {
if (!defined $validity_token_specs->{scope} || !exists $validity_token_specs->{token}) {
croak ('you must provide a hash ref "with_validity_token" with the keys "scope" and "token" if you want the token to be handled');
}

Also available in: Unified diff