Compare commits
	
		
			7 Commits
		
	
	
		
			9ab84073d0
			...
			be1854d7c1
		
	
	| Author | SHA1 | Date | 
|---|---|---|
| 
							
							
								
									
								
								 | 
						be1854d7c1 | |
| 
							
							
								
									
								
								 | 
						eb04d305ab | |
| 
							
							
								
								 | 
						471258c886 | |
| 
							
							
								
								 | 
						7cac708309 | |
| 
							
							
								
								 | 
						9b935541b0 | |
| 
							
							
								
									
								
								 | 
						d17b0a7cab | |
| 
							
							
								
									
								
								 | 
						ff03325e2b | 
| 
						 | 
					@ -65,8 +65,10 @@ class Job(db.Model, ModelSerializeMixin):
 | 
				
			||||||
    end: Optional[datetime] = db.Column(UtcDateTime)
 | 
					    end: Optional[datetime] = db.Column(UtcDateTime)
 | 
				
			||||||
    type: Union[JobType, int] = db.relationship("JobType")
 | 
					    type: Union[JobType, int] = db.relationship("JobType")
 | 
				
			||||||
    comment: Optional[str] = db.Column(db.String(256))
 | 
					    comment: Optional[str] = db.Column(db.String(256))
 | 
				
			||||||
    locked: bool = db.Column(db.Boolean())
 | 
					    locked: bool = db.Column(db.Boolean(), default=False, nullable=False)
 | 
				
			||||||
    services: list[Service] = db.relationship("Service", back_populates="job_")
 | 
					    services: list[Service] = db.relationship(
 | 
				
			||||||
 | 
					        "Service", back_populates="job_", cascade="save-update, merge, delete, delete-orphan"
 | 
				
			||||||
 | 
					    )
 | 
				
			||||||
    required_services: float = db.Column(db.Numeric(precision=4, scale=2, asdecimal=False), nullable=False)
 | 
					    required_services: float = db.Column(db.Numeric(precision=4, scale=2, asdecimal=False), nullable=False)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    event_ = db.relationship("Event", back_populates="jobs")
 | 
					    event_ = db.relationship("Event", back_populates="jobs")
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -15,7 +15,6 @@ from . import event_controller, permissions, EventPlugin
 | 
				
			||||||
from ...utils.HTTP import no_content
 | 
					from ...utils.HTTP import no_content
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 | 
				
			||||||
def dict_get(self, key, default=None, type=None):
 | 
					def dict_get(self, key, default=None, type=None):
 | 
				
			||||||
    """Same as .get from MultiDict"""
 | 
					    """Same as .get from MultiDict"""
 | 
				
			||||||
    try:
 | 
					    try:
 | 
				
			||||||
| 
						 | 
					@ -510,4 +509,5 @@ def lock_job(job_id, current_session: Session):
 | 
				
			||||||
        raise BadRequest
 | 
					        raise BadRequest
 | 
				
			||||||
    return no_content()
 | 
					    return no_content()
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# TODO: JobTransfer
 | 
					# TODO: JobTransfer
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -738,7 +738,7 @@ def set_picture(identifier, current_session):
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@PriceListPlugin.blueprint.route("/drinks/<int:identifier>/picture", methods=["GET"])
 | 
					@PriceListPlugin.blueprint.route("/drinks/<int:identifier>/picture", methods=["GET"])
 | 
				
			||||||
#@headers({"Cache-Control": "private, must-revalidate"})
 | 
					# @headers({"Cache-Control": "private, must-revalidate"})
 | 
				
			||||||
def _get_picture(identifier):
 | 
					def _get_picture(identifier):
 | 
				
			||||||
    """Get Picture
 | 
					    """Get Picture
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue