Skip to content

Commit

Permalink
Merge pull request #5 from guivaloz/guivaloz/nueva-rama
Browse files Browse the repository at this point in the history
Guivaloz/nueva rama
  • Loading branch information
guivaloz authored Mar 18, 2024
2 parents 6f83d86 + 215bbee commit 0ae830b
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions carina/core/materias/models.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Materias, modelos
"""

from sqlalchemy import Column, Integer, String
from sqlalchemy.orm import relationship

Expand All @@ -20,11 +21,7 @@ class Materia(Base, UniversalMixin):
# Columnas
clave = Column(String(16), nullable=False, unique=True)
nombre = Column(String(64), unique=True, nullable=False)

@property
def descripcion(self):
"""Descripción"""
return f"{self.clave} - {self.nombre}"
descripcion = Column(String(1024), nullable=False)

def __repr__(self):
"""Representación"""
Expand Down

0 comments on commit 0ae830b

Please sign in to comment.