Skip to content

Commit

Permalink
refactor(viewmodels): remove unused TransitAgency
Browse files Browse the repository at this point in the history
mostly ported to a context_processor so
agency data is available with all requests
  • Loading branch information
thekaveman committed Jul 18, 2023
1 parent 1286234 commit 79e3c23
Showing 1 changed file with 0 additions and 24 deletions.
24 changes: 0 additions & 24 deletions benefits/core/viewmodels.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
"""
from django.utils.translation import gettext_lazy as _

from benefits.core import models


class Button:
"""
Expand Down Expand Up @@ -128,25 +126,3 @@ def __init__(self, **kwargs):
def context_dict(self):
"""Return a context dict for a Page."""
return {"page": self}


class TransitAgency:
"""
Represents a core.models.TransitAgency:
* model: core.models.TransitAgency
"""

def __init__(self, model):
if isinstance(model, models.TransitAgency):
self.slug = model.slug
self.short_name = model.short_name
self.long_name = model.long_name
self.agency_id = model.agency_id
self.merchant_id = model.merchant_id
self.info_url = model.info_url
self.phone = model.phone
self.eligibility_index_url = model.eligibility_index_url

def context_dict(self):
"""Return a context dict for a TransitAgency."""
return {"agency": self}

0 comments on commit 79e3c23

Please sign in to comment.