mirror of
https://github.com/google/nomulus
synced 2026-09-12 02:56:26 +00:00
Allow a credit of 0 when deleting a domain during a grace period (#1984)
There can be situations (anchor tenants, test tokens, other ways of getting a domain to cost $0) where we may want to delete a domain during the add grace period but the credit applied is 0. We should not fail on those cases. See b/277115241 for an example.
This commit is contained in:
@@ -34,7 +34,7 @@ public class Credit extends BaseFee {
|
||||
BigDecimal cost, FeeType type, String description) {
|
||||
Credit instance = new Credit();
|
||||
instance.cost = checkNotNull(cost);
|
||||
checkArgument(instance.cost.signum() < 0);
|
||||
checkArgument(instance.cost.signum() <= 0, "A credit cannot have a positive cost");
|
||||
instance.type = checkNotNull(type);
|
||||
instance.description = description;
|
||||
return instance;
|
||||
|
||||
Reference in New Issue
Block a user