Comment 5 for bug 1821804

Revision history for this message
Josh Stompro (u-launchpad-stompro-org) wrote :

Hello, I was trying to track this down this morning, and I wonder if the problem has to do with translating between "t" and True or rather "f" and False.

I noticed that in the clone_addr(addr) function, .valid gets set to true, while in the source address it is set to 't'. So maybe we just need some logic to deal with it there, to set pending = false. I'm not sure if we need to handle cloning a pending address... or if we can assume that if we are cloning, it doesn't need to be pending?

// copy the billing and mailing addresses into new addresses
            function clone_addr(addr) {
                var new_addr = egCore.idl.toHash(addr);
                new_addr.id = service.virt_id--;
                new_addr.usr = user.id;
                new_addr.isnew = true;
                new_addr.valid = true;
                user.addresses.push(new_addr);
                return new_addr;
            }

It looks like the
service.ingest_address function normally fixes the booleans... but doesn't get used during a clone.

Josh