Remove excessive "M" and "N" fields, PositiveInteger is sufficient.

pull/2768/head
derekpierre 2021-08-20 09:23:28 -04:00
parent c5d62ba771
commit 57bfba6d4e
2 changed files with 3 additions and 11 deletions

View File

@ -42,10 +42,10 @@ class PolicyBaseSchema(BaseSchema):
'-bvk',
help="Bob's verifying key as a hexadecimal string",
type=click.STRING, required=False))
threshold = character_fields.Threshold(
threshold = base_fields.PositiveInteger(
required=True, load_only=True,
click=options.option_threshold)
shares = character_fields.Shares(
shares = base_fields.PositiveInteger(
required=True, load_only=True,
click=options.option_shares)
expiration = character_fields.DateTime(

View File

@ -15,17 +15,9 @@
along with nucypher. If not, see <https://www.gnu.org/licenses/>.
"""
from nucypher.control.specifications.fields.base import Integer, PositiveInteger
from nucypher.control.specifications.fields.base import Integer
from nucypher.cli import types
class Threshold(PositiveInteger):
pass
class Shares(PositiveInteger):
pass
class Wei(Integer):
click_type = types.WEI