MT#4145 Change postcode to txt, fix empty reseller

Postcodes can be alphanumeric in certain countries.

Avoid fault when editing a contact without reseller
(e.g. reseller/peer contact). You still can't save it without
setting a reseller (which might not be what we want).
agranig/peering-route
Andreas Granig 13 years ago
parent ddbd7426b2
commit 3acdd72dc6

@ -126,7 +126,7 @@ sub edit :Chained('base') :PathPart('edit') :Args(0) {
$params->{reseller}{id} = $c->user->reseller_id;
} elsif($c->user->is_superuser) {
$form = NGCP::Panel::Form::Contact::Admin->new;
$params->{reseller}{id} = $c->stash->{contact}->reseller->id;
$params->{reseller}{id} = $c->stash->{contact}->reseller_id;
} else {
$form = NGCP::Panel::Form::Contact::Reseller->new;
}

@ -41,7 +41,8 @@ has_field 'street' => (
);
has_field 'postcode' => (
type => 'Integer',
type => 'Text',
maxlength => 16,
);
has_field 'city' => (

Loading…
Cancel
Save