mirror of
				https://github.com/fspc/workstand.git
				synced 2025-11-04 00:45:35 -05:00 
			
		
		
		
	Size should be optional.
This commit is contained in:
		
							parent
							
								
									04376ff35e
								
							
						
					
					
						commit
						14456ee4f7
					
				
							
								
								
									
										20
									
								
								bikeshop_project/bike/migrations/0003_auto_20170105_1405.py
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										20
									
								
								bikeshop_project/bike/migrations/0003_auto_20170105_1405.py
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,20 @@
 | 
			
		||||
# -*- coding: utf-8 -*-
 | 
			
		||||
# Generated by Django 1.10.4 on 2017-01-05 14:05
 | 
			
		||||
from __future__ import unicode_literals
 | 
			
		||||
 | 
			
		||||
from django.db import migrations, models
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
class Migration(migrations.Migration):
 | 
			
		||||
 | 
			
		||||
    dependencies = [
 | 
			
		||||
        ('bike', '0002_auto_20170105_0238'),
 | 
			
		||||
    ]
 | 
			
		||||
 | 
			
		||||
    operations = [
 | 
			
		||||
        migrations.AlterField(
 | 
			
		||||
            model_name='bike',
 | 
			
		||||
            name='size',
 | 
			
		||||
            field=models.TextField(blank=True, choices=[('C', 'child'), ('M', 'medium'), ('L', 'large'), ('XL', 'extra large')], max_length=2, null=True),
 | 
			
		||||
        ),
 | 
			
		||||
    ]
 | 
			
		||||
@ -52,7 +52,7 @@ class Bike(models.Model):
 | 
			
		||||
 | 
			
		||||
    colour = models.TextField(blank=False, null=False)
 | 
			
		||||
    make = models.TextField(blank=False, null=False)
 | 
			
		||||
    size = models.TextField(choices=size_choices, max_length=2)
 | 
			
		||||
    size = models.TextField(choices=size_choices, blank=True, null=True, max_length=2)
 | 
			
		||||
    serial_number = models.TextField(blank=False, null=False)
 | 
			
		||||
    source = models.TextField(blank=False, null=False, choices=source_choices)
 | 
			
		||||
    stripped = models.NullBooleanField()
 | 
			
		||||
@ -72,7 +72,7 @@ class Bike(models.Model):
 | 
			
		||||
 | 
			
		||||
    def can_assessed(self):
 | 
			
		||||
        return self.colour is not None and self.make is not None and self.size is not None and self.source is not None \
 | 
			
		||||
               and self.price is not None
 | 
			
		||||
               and self.price is not None and self.size is not None
 | 
			
		||||
 | 
			
		||||
    def can_available(self):
 | 
			
		||||
        return self.stolen is not None and self.cpic_searched_at is not None and self.serial_number is not None
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user