-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Property lease #83
base: master
Are you sure you want to change the base?
Property lease #83
Conversation
a9f1490
to
9c0bc07
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Принесені зміни в білдаут зайві
Потрібно переключитися на ea_core гілку головного білдауту, створити новий пакет для цієї процедури і вносити правки туди разом з тестами.
|
||
class LeaseTerms(Model): | ||
|
||
leaseDuration = StringType(required=True) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
return | ||
if calculate_business_date(period.startDate, MINIMAL_EXPOSITION_PERIOD, data) > period.endDate: | ||
raise ValidationError(u"tenderPeriod should be greater than 6 days") | ||
auctionStartDate = data.get('auctionPeriod').startDate |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
data.get('auctionPeriod').startDate визначає хронограф, таких валідацій робити не можна, наступне значення може бути як і змінено, так і видалено
auctionStartDate = data.get('auctionPeriod').startDate | ||
delayed_auction_start_date = calculate_business_date(period.endDate, timedelta(days=4), data).replace(hour=0, minute=0, second=0, microsecond=0) | ||
normal_auction_start_date = calculate_business_date(period.endDate, timedelta(days=1), data).replace(hour=0, minute=0, second=0, microsecond=0) | ||
if (delayed_auction_start_date != auctionStartDate and normal_auction_start_date != auctionStartDate): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Допустимі рамки точно не x є N\{1,4}
|
||
def validate_id(self, data, code): | ||
if data.get('scheme') != u'CPVS': | ||
raise ValidationError('propertyLease additionalClassifications scheme should be CPVS') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Це валідація не id
, обмеження вибору в scheme
id = StringType(required=True, default=u'PA01-7') | ||
|
||
def validate_id(self, data, code): | ||
if data.get('scheme') != u'CPVS': |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Не можна обмежувати всі AdditionalClassification
лише на CPVS
@@ -94,6 +97,25 @@ def validate_id(self, data, code): | |||
raise ValidationError(BaseType.MESSAGES['choices'].format(unicode(CPVS_CODES))) | |||
|
|||
|
|||
class PropertyLeaseClassification(Classification): | |||
scheme = StringType(required=True, default=u'CAV-PS') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Тут має бути оюмежено лише на CAV-PS
"""A good, service, or work to be contracted.""" | ||
classification = ModelType(CPVCAVClassification, required=False) | ||
propertyLeaseClassification = ModelType(PropertyLeaseClassification, required=True) | ||
additionalClassifications = ModelType(PropertyLeaseAdditionalClassification, required=True) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Цей список має мати мінімальний розмір і валідацію на перший обов'язковий елемент
|
||
|
||
class PropertyLeaseAdditionalClassification(Classification): | ||
scheme = StringType(required=True, default=u'CPVS') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
default значень тут не повинно бути
…4361_daylight_savings A547225166224361 daylight savings
No description provided.