Skip to content

Commit

Permalink
Merge pull request #333 from EBI-Metagenomics/hotfix/webuploader-ena-…
Browse files Browse the repository at this point in the history
…db-views-query-fix

Workaround to query ENA / ERAPRO Views.
  • Loading branch information
mberacochea authored Nov 1, 2023
2 parents 138a466 + aa052b6 commit a33851f
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions emgena/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -194,12 +194,20 @@ class Meta:

class RunStudy(StudyAbstract):
class Meta(StudyAbstract.Meta):
db_table = 'V_MGP_RUN_STUDY'
# ERA needs to be appended as the default connection tries to use
# the PUBLIC SYNONYM (according to ENA) and it's not working ATM
# we were advised to prefix the views and this is the simplest way.
# The short-term plan is to remove the dependency of ENA databases
db_table = 'ERA\".\"V_MGP_RUN_STUDY'


class AssemblyStudy(StudyAbstract):
class Meta(StudyAbstract.Meta):
db_table = 'V_MGP_ASSEMBLY_STUDY'
# ERA needs to be appended as the default connection tries to use
# the PUBLIC SYNONYM (according to ENA) and it's not working ATM
# we were advised to prefix the views and this is the simplest way.
# The short-term plan is to remove the dependency of ENA databases
db_table = 'ERA\".\"V_MGP_ASSEMBLY_STUDY'


class Project(models.Model):
Expand Down

0 comments on commit a33851f

Please sign in to comment.