Skip to content

Commit

Permalink
make dest dataset optional
Browse files Browse the repository at this point in the history
  • Loading branch information
garciampred committed Dec 20, 2024
1 parent f4e5fa4 commit bdfc9f5
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion cdsobs/cli/_copy_dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ def copy_dataset(


def _copy_dataset_impl(cdsobs_config_yml, dataset, dest_config_yml, dest_dataset):
if dest_dataset is None:
dest_dataset = dataset
check_params(dest_config_yml, dataset, dest_dataset)

try:
Expand Down Expand Up @@ -191,7 +193,7 @@ def catalogue_copy(
for entry in entries:
# This is needed to load the constraints as it is a deferred attribute.
# However if we load them the other attributes will dissappear from __dict__
# There is no way apparently if doing this better in sqlalchemy
# There is no way apparently of doing this better in sqlalchemy
entry_dict = {
col.name: getattr(entry, col.name) for col in entry.__table__.columns
}
Expand Down

0 comments on commit bdfc9f5

Please sign in to comment.