Resolves #3 — start_time, end_time, and limit can now be blank. Tests already dealt with the null case.
This commit is contained in:
		
							parent
							
								
									4c7024c9ff
								
							
						
					
					
						commit
						eebf9e81f5
					
				
					 2 changed files with 32 additions and 0 deletions
				
			
		
							
								
								
									
										29
									
								
								registrasion/migrations/0010_auto_20160330_2342.py
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										29
									
								
								registrasion/migrations/0010_auto_20160330_2342.py
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
					@ -0,0 +1,29 @@
 | 
				
			||||||
 | 
					# -*- coding: utf-8 -*-
 | 
				
			||||||
 | 
					from __future__ import unicode_literals
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					from django.db import migrations, models
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					class Migration(migrations.Migration):
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    dependencies = [
 | 
				
			||||||
 | 
					        ('registrasion', '0009_auto_20160330_2336'),
 | 
				
			||||||
 | 
					    ]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    operations = [
 | 
				
			||||||
 | 
					        migrations.AlterField(
 | 
				
			||||||
 | 
					            model_name='timeorstocklimitenablingcondition',
 | 
				
			||||||
 | 
					            name='end_time',
 | 
				
			||||||
 | 
					            field=models.DateTimeField(help_text='Products included in this condition will only be available before this time.', null=True, blank=True),
 | 
				
			||||||
 | 
					        ),
 | 
				
			||||||
 | 
					        migrations.AlterField(
 | 
				
			||||||
 | 
					            model_name='timeorstocklimitenablingcondition',
 | 
				
			||||||
 | 
					            name='limit',
 | 
				
			||||||
 | 
					            field=models.PositiveIntegerField(help_text='The number of items under this grouping that can be purchased.', null=True, blank=True),
 | 
				
			||||||
 | 
					        ),
 | 
				
			||||||
 | 
					        migrations.AlterField(
 | 
				
			||||||
 | 
					            model_name='timeorstocklimitenablingcondition',
 | 
				
			||||||
 | 
					            name='start_time',
 | 
				
			||||||
 | 
					            field=models.DateTimeField(help_text='Products included in this condition will only be available after this time.', null=True, blank=True),
 | 
				
			||||||
 | 
					        ),
 | 
				
			||||||
 | 
					    ]
 | 
				
			||||||
| 
						 | 
					@ -441,16 +441,19 @@ class TimeOrStockLimitEnablingCondition(EnablingConditionBase):
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    start_time = models.DateTimeField(
 | 
					    start_time = models.DateTimeField(
 | 
				
			||||||
        null=True,
 | 
					        null=True,
 | 
				
			||||||
 | 
					        blank=True,
 | 
				
			||||||
        help_text=_("Products included in this condition will only be "
 | 
					        help_text=_("Products included in this condition will only be "
 | 
				
			||||||
                    "available after this time."),
 | 
					                    "available after this time."),
 | 
				
			||||||
    )
 | 
					    )
 | 
				
			||||||
    end_time = models.DateTimeField(
 | 
					    end_time = models.DateTimeField(
 | 
				
			||||||
        null=True,
 | 
					        null=True,
 | 
				
			||||||
 | 
					        blank=True,
 | 
				
			||||||
        help_text=_("Products included in this condition will only be "
 | 
					        help_text=_("Products included in this condition will only be "
 | 
				
			||||||
                    "available before this time."),
 | 
					                    "available before this time."),
 | 
				
			||||||
    )
 | 
					    )
 | 
				
			||||||
    limit = models.PositiveIntegerField(
 | 
					    limit = models.PositiveIntegerField(
 | 
				
			||||||
        null=True,
 | 
					        null=True,
 | 
				
			||||||
 | 
					        blank=True,
 | 
				
			||||||
        help_text=_("The number of items under this grouping that can be "
 | 
					        help_text=_("The number of items under this grouping that can be "
 | 
				
			||||||
                    "purchased."),
 | 
					                    "purchased."),
 | 
				
			||||||
    )
 | 
					    )
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		
		Reference in a new issue